c# - TypeDescriptor.GetProperties from property in another class -


I am using GetProperties to get the property file with the map

  PropertyDescriptor descriptor = TypeDescriptor.GetProperties (GetType ()) [attrNane];   

But is it possible to get property descriptor from another class?

Example

  class a {The name of the public string; } Class B {public B () {property descriptor descriptor = type descriptor. GetPyPerties (GetType ()) ["a.name"]; }   

}

So I want to get property name from "name" class propertyDescriptor > A . Is it possible anyway?

You can get a type another category.

  get class {public string name}; Set;}} class B {public B () {property descriptor descriptor = type descriptor. GetProperties (typef (a)) ["name"]; }   

Note that I have converted a.name into a property.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -