With C# 6.0, this is now a non-issue as you can do:
nameof(SomeProperty)
This expression is resolved at compile-time to "SomeProperty"
.
More Related Contents:
- Get property value from string using reflection
- How to get the list of properties of a class?
- Set object property using reflection
- How can I evaluate C# code dynamically?
- Dynamically Add C# Properties at Runtime
- Get properties in order of declaration using reflection
- Setting/getting the class properties by string name [duplicate]
- How to check whether an object has certain method/property?
- How Can I add properties to a class on runtime in C#?
- How to get current property name via reflection?
- How to set value of property where there is no setter
- How can I get the value of a string property via Reflection?
- C# Reflection and Getting Properties
- Getting attributes of Enum’s value
- Setting a property by reflection with a string value
- Change Attribute’s parameter at runtime
- Making a generic property
- How do I get all instances of all loaded types that implement a given interface?
- Reflection – Getting the generic arguments from a System.Type instance
- Are there any reasons to use private properties in C#?
- How do you get a variable’s name as it was physically typed in its declaration? [duplicate]
- Enumerating through an object’s properties (string) in C#
- C# reflection – load assembly and invoke a method if it exists
- Exposing Property as Variant in .NET for Interop
- C# Getting value of params using reflection
- Add property to anonymous type after creation
- How can I protect my private funcs against reflection executing?
- Implementations of interface through Reflection
- How to recursively print the values of an object’s properties using reflection
- Run a method before all methods of a class