About 20,700,000 results
Open links in new tab
  1. How to get current property name via reflection? - Stack Overflow

    Reflection is used to do work with types that can't be done at compile time. Getting the name of the property accessor you're in can be decided at compile time so you probably shouldn't use …

  2. c# - Reflection - Getting the generic arguments from a …

    Reflection - Getting the generic arguments from a System.Type instance Asked 17 years ago Modified 4 years, 11 months ago Viewed 26k times

  3. Comparing Object properties using reflection - Stack Overflow

    The main value of reflection would be to write a general purpose object comparer that could take two instances of any kind of object and compare their public fields and properties. This helps …

  4. How can I add reflection to a C++ application? - Stack Overflow

    Sep 3, 2008 · The information you can get back from RTTI isn't enough to do most of the things you'd actually want reflection for though. You can't iterate over the member functions of a …

  5. How can I get the value of a string property via Reflection?

    public class Foo { public string Bar {get; set;} } How do I get the value of Bar, a string property, via reflection? The following code will throw an exception if the PropertyInfo type is a System.

  6. c# - LINQ Issue: Unable to cast object of type 'System.Reflection ...

    Oct 16, 2008 · LINQ Issue: Unable to cast object of type 'System.Reflection.Module' to type 'System.Reflection.Emit.ModuleBuilder Asked 16 years, 3 months ago Modified 16 years, 3 …

  7. java - What is reflection and why is it useful? - Stack Overflow

    Sep 1, 2008 · What is reflection, and why is it useful? I'm particularly interested in Java, but I assume the principles are the same in any language.

  8. Reflection - Call constructor with parameters - Stack Overflow

    ParameterInfo[] parameters = classType.GetConstructors()[0].GetParameters(); I would like to call constructor with default parameter values or if parameter is enum, with first enum value. If …

  9. what is reflection in C#, what are the benefit. How to use it to get ...

    Jun 23, 2010 · Reflection is the ability of types to provide information about themselves. For example, an assembly can tell you what it contains, a type can tell you its methods, properties …

  10. How to dynamically create generic C# object using reflection?

    Oct 3, 2015 · I want to dynamically create TaskA or TaskB using C# reflection (Activator.CreateInstance). However I wouldn't know the type before hand, so I need to …