How can I use a static Guid as argument in an attribute?
static class X
{
public static readonly Guid XyId = new Guid("---");
}
[MyAttribute(X.XyId)] // does not work
public class myClass
{
}
It does not work because Guid must be readonly, it can not be const. The string and byte[] representation would also be readonly.
Is there any workaround for this?