About 2,320,000 results
Open links in new tab
  1. c# - Set object property using reflection - Stack Overflow

    Or you could wrap Marc's one liner inside your own extension class: public static class PropertyExtension{ public static void SetPropertyValue(this object obj, string propName, object …

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

    Reflection is an invaluable tool when used with care. I created a O/R mapping library in C# which used reflection to do the bindings. This worked fantastically well. Most of the reflection code …

  3. What is concept of reflection in JavaScript? - Stack Overflow

    Nov 6, 2018 · JavaScript already has reflection features in ES5 even though they were not named reflection either by specification or by the community. Methods such as Array.isArray , …

  4. 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 …

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

    Nov 27, 2022 · Drawbacks of Reflection. Reflection is powerful, but should not be used indiscriminately. If it is possible to perform an operation without using reflection, then it is …

  6. Why does C++ not have reflection? - Stack Overflow

    Dec 11, 2008 · Unlike reflection in most languages, the plan for c++ reflection is compile time reflection. So at compile time, you can reflect over struct members, function and method …

  7. Reflection support in C - Stack Overflow

    Aug 30, 2009 · A C reflection API provides access to runtime reflection metadata for C structure declarations with support for arbitrarily nested combinations of: intrinsic, set, enum, struct, …

  8. c# - Using Reflection in .NET Core - Stack Overflow

    Mar 21, 2016 · My library needs to use a couple reflection mechanisms I am familiar with from the full .net 4 framework, but I don't now how to access these in a .NET Core library. Specifically: …

  9. c# - Find a private field with Reflection? - Stack Overflow

    Sep 19, 2008 · Given this class class Foo { // Want to find _bar with reflection [SomeAttribute] private string _bar; public string BigBar { get { return this._bar; } } } I want to

  10. c# - Set value of private field - Stack Overflow

    Nov 6, 2019 · Try this (inspired by Find a private field with Reflection?): var prop = s.GetType().GetField("id", System.Reflection.BindingFlags.NonPublic | …

Refresh