About 8,100,000 results
Open links in new tab
  1. 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 …

  2. Change private static final field using Java reflection

    Jul 21, 2010 · I have a class with a private static final field that, unfortunately, I need to change it at run-time. Using reflection I get this error: java.lang.IllegalAccessException: Can not set …

  3. 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: …

  4. Reflection support in C - Stack Overflow

    Aug 30, 2009 · Reflection as analysis is generally very weak; usually it can only provide access to function and field names. This weakness comes from the language implementers essentially …

  5. How do I use reflection to invoke a private method?

    Reflection is slow. Private members reflection breaks encapsulation principle and thus exposing your code to the following : Increase complexity of your code because it has to handle the …

  6. reflection - Loading DLLs at runtime in C# - Stack Overflow

    I am trying to figure out how you could go about importing and using a .dll at runtime inside a C# application. Using Assembly.LoadFile() I have managed to get my program to load the dll (this …

  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. java - How do I test a class that has private methods, fields or …

    Aug 29, 2008 · How do I use JUnit to test a class that has internal private methods, fields or nested classes? It seems bad to change the access modifier for a method just to be able to …

  9. reflection - Cast to a reflected Type in C# - Stack Overflow

    the dynamic internally uses reflection. You could use reflection directly to get the Quack method and call it Case 5: as case 4, but using directly reflection: object objFoo = MakeFoo(); // object …

  10. java.lang.NoSuchFieldError: REFLECTION - Stack Overflow

    java.lang.NoSuchFieldError: REFLECTION Asked 11 years, 1 month ago Modified 3 years, 3 months ago Viewed 72k times