Refection problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • csharpula csharp

    Refection problems

    Hello ,
    I would like to ask about the following issue:

    I am activating this code after i created the InitializationA ttribute
    and added it above objects:

    PropertyInfo[] properties = this.GetType(). GetProperties() ;
    foreach (PropertyInfo property in properties)
    {
    object[] attributes =
    property.GetCus tomAttributes(t ypeof(Initializ ationAttribute) ,true);
    }

    I get an empty list of object[] attributes although I have objects
    which are signed with this attribute in code.
    Why is that?
    Thank u!

    *** Sent via Developersdex http://www.developersdex.com ***
Working...