C# では、属性クラスの使用方法を指定するときに、列挙型にGenericParameter値があります。System.AttributeTargetsこのような属性をどのように適用できますか、構文は何ですか?
[System.AttributeUsage(System.AttributeTargets
public sealed class MyAnnotationAttribute : System.Attribute {
public string Param { get; private set; }
public MyAnnotationAttribute(string param) { Param = param; }
}
System.AttributeTargets.Module(メインモジュール以外のモジュールを宣言する方法さえ知りません???) 、System.AttributeTargets.ParameterおよびSystem.AttributeTargets.ReturnValue.