code error CS8025

Please help me with this error.
here is code:

using UnityEngine;
using UnityEditor;
using System.Collections;


{
    private static Vector3 position;
    private static Quaternion rotation;
    private static Vector3 scale;
    
    [MenuItem ("Custom/Transform Copier/Copy Transform &%c")]
    static void DoRecord()
    {
       position = Selection.activeTransform.localPosition;
       rotation = Selection.activeTransform.localRotation;
       scale = Selection.activeTransform.localScale;
        
//        EditorUtility.DisplayDialog("Transform Copy", "Local position, rotation, & scale of "+myName +" copied relative to parent.", "OK", "");
    }
 
    [MenuItem ("Custom/Transform Copier/Paste Transform &%v")]
    static void DoApply()
    {
        Selection.activeTransform.localPosition = position;
        Selection.activeTransform.localRotation = rotation;
        Selection.activeTransform.localScale = scale;      
        
//        EditorUtility.DisplayDialog("Transform Paste", "Local position, rotation, and scale of "+myName +"  pasted relative to parent of "+Selection.activeTransform.name+".", "OK", "");
    }
}

In general, it’s good to copy the entire error message - the message tells us what line the error occurs on.

In this case, it’s easy to see what’s wrong: you have no class name defined. You need something like this:

using UnityEngine;
using UnityEditor;
using System.Collections;

public class MyClass : MonoBehaviour
{