Sure. Get the Type object (either using type(MyClass) or
<instance>.GetType()), and then call MethodInvoke(). Note that this is
slower than calling normally. You can get some speed increase by creating a
delegate of of a MethodInfo (use type.GetMethods to get the appropriate
method info), and then calling through that.
--
Eric Gunnerson
Visit the C# product team at
http://www.csharp.net
Eric's blog is at
http://blogs.gotdotnet.com/ericgu/
This posting is provided "AS IS" with no warranties, and confers no rights.
"matt" <ma*************@fox-net.co.uk> wrote in message
news:01****************************@phx.gbl...
can i say store a method name in a database & then bring
it back & run it?
sort of like using the eval() in javascript?
i would prefer not to have a masively big switch
statement & instead store the relevent method name in the
database with the relevent record.
thanks in advance for any help.
M@