system.reflection 
Author Message
 system.reflection

Hi.

sorry for my english.

I'm treating to build and to interpret functions that would enter the user
directly from your interface.

Like this examples:  User can enter the string "GiveMeDate()" and the system
should interpret that the function should return the date.

another example would be enter the function GiveMeGross(comprob) and to
return the gross of the comprob passed as parameter.

All the documentation that i read it point to system.reflection.emit, but
really is costing me.

Someone can help me ?

Many thanks.



Wed, 06 Oct 2004 12:43:06 GMT  
 system.reflection
Suppose that you want to call methods on a string. For simplicity, you are
only calling methods that don't have arguments.

System.Type type = Type.GetType("System.String");
String str = "this is the string";

String stMethod = Console.ReadLine(); //when prompted, type "ToUpper"
System.Reflection.MethodInfo mi = type.GetMethod(mi, new Type[0]);
String result = mi.Invoke(str, new object[0]);
Console.WriteLine("the result is: {0}",result);


Quote:
> Hi.

> sorry for my english.

> I'm treating to build and to interpret functions that would enter the user
> directly from your interface.

> Like this examples:  User can enter the string "GiveMeDate()" and the
system
> should interpret that the function should return the date.

> another example would be enter the function GiveMeGross(comprob) and to
> return the gross of the comprob passed as parameter.

> All the documentation that i read it point to system.reflection.emit, but
> really is costing me.

> Someone can help me ?

> Many thanks.



Thu, 07 Oct 2004 13:50:37 GMT  
 system.reflection
Many thanks Oleg

"Oleg Mustiazza" <.> escribi en el mensaje

Quote:
> Suppose that you want to call methods on a string. For simplicity, you are
> only calling methods that don't have arguments.

> System.Type type = Type.GetType("System.String");
> String str = "this is the string";

> String stMethod = Console.ReadLine(); //when prompted, type "ToUpper"
> System.Reflection.MethodInfo mi = type.GetMethod(mi, new Type[0]);
> String result = mi.Invoke(str, new object[0]);
> Console.WriteLine("the result is: {0}",result);



> > Hi.

> > sorry for my english.

> > I'm treating to build and to interpret functions that would enter the
user
> > directly from your interface.

> > Like this examples:  User can enter the string "GiveMeDate()" and the
> system
> > should interpret that the function should return the date.

> > another example would be enter the function GiveMeGross(comprob) and to
> > return the gross of the comprob passed as parameter.

> > All the documentation that i read it point to system.reflection.emit,
but
> > really is costing me.

> > Someone can help me ?

> > Many thanks.



Sat, 09 Oct 2004 23:54:19 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. why is System.Reflection.Assembly.GetEntryAssembly() null

2. Use system.reflection for object

3. System.Reflection Finding Interace Implementations

4. use System.Reflection

5. q: System.Reflection & indexers

6. how to user System.Reflection?Please help me

7. System.Reflection.Emit ?

8. using System.Reflection.Emit to modify static assembly

9. Problems using system.reflection

10. system.reflection

11. System.Reflection

12. Create Enum by using System.Reflection.Emit

 

 
Powered by phpBB® Forum Software