R
raulavi
C# vs2008
need to write the correct customAttribute code.
I will have a class with properties having custom attributes
How can I use reflection to read the class and extract only properties
with attribute "onBrowse" with value true and the size assigned to the
property
thanks
sample:
Class TheClass
private string somevar1;
public string SomeVar1
{
....
}
private string varBrw1;
[onBrowse=true] //or [onBrowse["true")]
public string VarBrw1
{
....
}
so on
need to run reflection and get
varBrw1 and all the others with the correct attribute = true
and display the size attribute value
need to write the correct customAttribute code.
I will have a class with properties having custom attributes
How can I use reflection to read the class and extract only properties
with attribute "onBrowse" with value true and the size assigned to the
property
thanks
sample:
Class TheClass
private string somevar1;
public string SomeVar1
{
....
}
private string varBrw1;
[onBrowse=true] //or [onBrowse["true")]
public string VarBrw1
{
....
}
so on
need to run reflection and get
varBrw1 and all the others with the correct attribute = true
and display the size attribute value