Displaying class methods in a list

E

Eric

Is there a way I can provide an attribute(s) to methods of a class such that
all methods with a certain attribute
could be bindable and used as a datasource in a dropdownlist?

public class MyClass
{
public MyClass()
{
}
[Description("Method 1"), Category("User Methods")]
[Browsable(true)]
[Bindable(true)]
public void Method1()
{
....
}
[Description("Edit an existing Patient"), Category("Internal Methods")]
[Browsable(true)]
[Bindable(true)]
public void Method2()
{
...
}
}

What I'm after is a way to return, from a form as an example, a bindable
datasource in which I could Display the Description attribute, return the
method name, and filter by the Category if possible.



Thanks
 
P

Peter Rilling

I think that any class that implements IList can already be bound to those
controls. Is there something specific that you are looking for?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top