About 51 results
Open links in new tab
  1. 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.

  2. c# - Get class methods using reflection - Stack Overflow

    Feb 25, 2017 · How can I get all the public methods of class using reflection when class name is passed as a string as shown in the below method. ? private MethodInfo[] GetObjectMethods(string …

  3. Why is the use of reflection in .NET recommended?

    Sep 22, 2009 · The main value of Reflection is that it can be used to inspect assemblies, types, and members. It's a very powerful tool for determining the contents of an unknown assembly or object …

  4. Get property value from string using reflection - Stack Overflow

    I am trying implement the Data transformation using Reflection 1 example in my code. The GetSourceValue function has a switch comparing various types, but I want to remove these types …

  5. Reflection - get attribute name and value on property

    In my main method, I'm using reflection and wish to get key value pair of each attribute for each property. So in this example, I'd expect to see "Author" for attribute name and "AuthorName" for the …

  6. c# - Set object property using reflection - Stack Overflow

    Is there a way in C# where I can use reflection to set an object property? Ex: MyObject obj = new MyObject(); obj.Name = "Value"; I want to set obj.Name with reflection. Something like: Reflection.

  7. Is it bad practice to use Reflection in Unit testing? [duplicate]

    Oct 11, 2014 · During the last years I always thought that in Java, Reflection is widely used during Unit testing. Since some of the variables/methods which have to be checked are private, it is somehow …

  8. 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 and so on.

  9. c# - How costly is .NET reflection? - Stack Overflow

    Aug 24, 2008 · Reflection is costly because of the many checks the runtime must make whenever you make a request for a method that matches a list of parameters. Somewhere deep inside, code exists …

  10. Java introspection and reflection - Stack Overflow

    Jan 11, 2010 · With that caveat in mind, reflection is a powerful technique and can enable applications to perform operations which would otherwise be impossible. Introspection (taken from archive of sun …