Reflection and custom property

  • Thread starter Thread starter raulavi
  • Start date Start date
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
 
jeff..thanks

not quite...been there.. tried that code...but there are pieces missing for
my purpose.

been reading about custom properties and got something working. still need
a pseudo code to complete my task.
 
not quite...been there.. tried that code...but there are pieces missing
for
my purpose.

been reading about custom properties and got something working. still need
a pseudo code to complete my task.

At this point you'd need to post the code showing what you're currently
trying to do and where you believe it's falling short of your needs.
 
Back
Top