R
raylopez99
What good is C# Reflection, other than to find out what types are in
an assembly? And to dynamically invoke methods in an assembly (.dll
or .exe)?
Also, bonus question, can you use Reflection to build a compiler? One
that will construct a user defined class "on the fly" (literally, the
user defines a class, instantiates it, and runs it from the console
mode, all the while prompted by the program)?
I guess so, but my final question is whether anybody has used
Reflection. Seems that some people use reflection to dynamically
invoke methods in an assembly (.dll or .exe), which might be useful
for using old non-C# unmanaged code.
RL
The Reflection API allows a C# program to inspect and manipulate
itself. It can be used to effectively find all the types in an
assembly and/or dynamically invoke methods in an assembly. It can at
times even be used to emit Intermediate Language code on the fly so
that the generated code can be executed directly.
an assembly? And to dynamically invoke methods in an assembly (.dll
or .exe)?
Also, bonus question, can you use Reflection to build a compiler? One
that will construct a user defined class "on the fly" (literally, the
user defines a class, instantiates it, and runs it from the console
mode, all the while prompted by the program)?
I guess so, but my final question is whether anybody has used
Reflection. Seems that some people use reflection to dynamically
invoke methods in an assembly (.dll or .exe), which might be useful
for using old non-C# unmanaged code.
RL
The Reflection API allows a C# program to inspect and manipulate
itself. It can be used to effectively find all the types in an
assembly and/or dynamically invoke methods in an assembly. It can at
times even be used to emit Intermediate Language code on the fly so
that the generated code can be executed directly.