Top "Reflection" questions

How do I use reflection to invoke a private method?

There are a group of private methods in my class, and I need to call one dynamically based on an …

c# .net reflection private-methods
Dynamically Add C# Properties at Runtime

I know there are some questions that address this, but the answers usually follow along the lines of recommending a …

c# dynamic reflection properties
How to have Java method return generic list of any type?

I would like to write a method that would return a java.util.List of any type without the need …

java list generics reflection casting
Getting assembly name

C#'s exception class has a source property which is set to the name of the assembly by default. Is …

c# .net reflection assemblyinfo
Getting all types in a namespace via reflection

How do you get all the classes in a namespace through reflection in C#?

c# .net reflection namespaces
How to dynamically create generic C# object using reflection?

In C# I have the following object: public class Item { } public class Task<T> { } public class TaskA<…

c# generics reflection activator
Find a private field with Reflection?

Given this class class Foo { // Want to find _bar with reflection [SomeAttribute] private string _bar; public string BigBar { get { return …

c# .net reflection .net-attributes
How to enumerate an object's properties in Python?

I C# we do it through reflection. In Javascript it is simple as: for(var propertyName in objectName) var currentPropertyValue = …

python reflection properties
Purpose of Activator.CreateInstance with example?

Can someone explain Activator.CreateInstance() purpose in detail?

c# .net reflection
Check if a class is derived from a generic class

I have a generic class in my project with derived classes. public class GenericClass<T> : GenericInterface<T&…

c# generics reflection