How do I take a GUID as an attribute parameter?
问题 I need a Guid property in some attribute class like this: public class SomeAttribute : Attribute { private Guid foreignIdentificator; public Guid ForeignIdentificator { get { return this.foreignIdentificator; } set { this.foreignIdentificator = value; } } } But in attribute definition I can use only primitive types, which are constants ( I understand why, and it's make me sense ). The workaround can be definition "ForeignIdentificator" as string, and creating Guid in runtime: public class