using System;
using System.Reflection;
using System.Runtime.CompilerServices;
public class MyAttribute : Attribute
{
const string p = nameof(p);
public MyAttribute(int p, [CallerMemberName] string arg = "<default>")
{
Console.WriteLine(arg);
}
}
[My(default(int))]
public class Program
{
static void Main()
{
typeof(Program).GetCustomAttribute(typeof(MyAttribute));
}
}