Posts

Showing posts with the label Reflection

Reflection In C#

Image
Reflection                 This language feature allows you to inspect the assemblies’ metadata (information of types). Use of Reflection 1.        Late binding 2.        Allow to inspect the content of assembly How to use Reflection public class Program     {         static void Main( string [] args)         {             Type tp = Type .GetType( "ConsoleApplication1.Calculator" );             PropertyInfo [] pInfo = tp.GetProperties();              MethodInfo [] minfo = tp.GetMethods();             //Create Instance ...