Hi all,
is there any way how to access type which is decorated with mine
attribute within that attribute?
E.g.
[MyAttr]
public class Whatever
{
}
[AttributeUsage(Class)]
public class MyAttrAttribute : Attribute
{
MyAttrAttribute()
{
Type t = .... //want to get typeof(Whatever)
}
}
I fear it is not possible, but ...
Motivation behind this is to override ElementName property for XmlRoot
attribute so that it will remove our corporate decorations from
element names (so I need type name)
Thanks,
Martin
|