string PropertyName { get; set; }

robot_2Generated
code_blocksInput

Description

The PropertyName property provides the name of the original property being wrapped. If the property is static, it will return the full name, including the type to which it belongs.

Usage

Use the PropertyName property to retrieve the name of the property that is being wrapped by the WrappedPropertyGet<T> struct. This can be useful for debugging or logging purposes, where you need to know the exact property name being accessed.

Example

// Example usage of WrappedPropertyGet<T>.PropertyName

// Assume we have a class with a property
public class ExampleClass
{
    public int ExampleProperty { get; set; }
}

// Somewhere in the code, we wrap the property
WrappedPropertyGet<int> wrappedProperty = new WrappedPropertyGet<int>();

// Access the PropertyName
string propertyName = wrappedProperty.PropertyName;

// Output the property name
// This will output "ExampleProperty" if the property is not static
// If static, it will output something like "ExampleClass.ExampleProperty"