PC Review


Reply
Thread Tools Rate Thread

Access decorated type within attribute

 
 
Martin Aliger
Guest
Posts: n/a
 
      30th Dec 2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default value attribute for type. Mr. X. Microsoft C# .NET 2 13th Jul 2010 09:33 PM
How to get attribute type from Active Directory shashank kadge Microsoft C# .NET 1 28th Mar 2007 05:22 PM
Getting description attribute value from value type Smokey Grindle Microsoft VB .NET 4 18th Aug 2006 07:00 PM
Get the type an attribute is defined on. Steve Microsoft C# .NET 3 12th Jan 2005 12:30 AM
Reflection: Get type signed with attribute Markus Wildgruber Microsoft Dot NET Framework 1 12th Aug 2003 10:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:21 PM.