Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

what is reflection in programming

//Ability to access objects fields/methods (also if they are private)
// in run time (read more about the subjects pro`s and con`s before impl)

// Without reflection
Foo foo = new Foo();
foo.PrintHello();

// With reflection
Object foo = Activator.CreateInstance("complete.classpath.and.Foo");
MethodInfo method = foo.GetType().GetMethod("PrintHello");
method.Invoke(foo, null);
Comment

PREVIOUS NEXT
Code Example
Csharp :: bundle.config in mvc is missing 
Csharp :: how to set foreground from code wpf 
Csharp :: c# remove item from list 
Csharp :: c# excel workbook 
Csharp :: convert decimal to 2 decimal places c# 
Csharp :: c# signalr console app client example 
Csharp :: C# network traffic 
Csharp :: how get data from json in c# 
Csharp :: verify if number c# 
Csharp :: solid principles c# 
Csharp :: how to close a form c# 
Csharp :: c# datetime blank 
Csharp :: uri file path c# 
Csharp :: unity banner Ad position 
Csharp :: export list to excel c# 
Csharp :: how to make pc bsod C# 
Csharp :: Sort ListBox numerically in C# 
Csharp :: deserialize json to dynamic object c# 
Csharp :: how to make a string a list of characters c# 
Csharp :: datatable iqueryable c# linq 
Csharp :: linked list reverse 
Csharp :: how to insert value to identity column using entity framwork 
Csharp :: rigidbody.addforce not working 
Csharp :: c# get witdh of matrix 
Csharp :: c# get date without time 
Csharp :: C# int array initial values 
Csharp :: how to have referecne to script in unity 
Csharp :: C# loop through the registry searching for keys containing 
Csharp :: how to use buildcontext in initstate flutter 
Csharp :: select distinct linq mvc 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =