Objects (instances) have no name, but classes (and types in general) have
names and you can create objects (instances) by name using the
System.Activator.CreateInstanceXXX(...), equivalent to the classic VB
CreateObject function.
Once the object is created, you can invoke methods by name using
System.Type.InvokeMember("mymethodname",..., myobject,...)
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"Xia Wei" <ip*****@gmail.com> escribió en el mensaje
news:d0***********@mail.cn99.com...
it's possible to invoke a method by the method's name and the parameter
list - through System.Reflection.MethodInfo class.
but i think there is no way to get a object by it's name. once the code is
compiled, the object's name is nothing.
- Xia Wei