Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Description of object reference #1

Open
BinToss opened this issue May 1, 2022 · 0 comments
Open

Get Description of object reference #1

BinToss opened this issue May 1, 2022 · 0 comments

Comments

@BinToss
Copy link

BinToss commented May 1, 2022

This is the current way to get the Description of a non-static, instanced property.

// ConfigurationTweaks is a class
// Tweaks is an instance of the class
// Acceleration is a boolean property in ConfigurationTweaks

string tmp = typeof(ConfigurationTweaks).GetPropertyDescription(nameof(Tweaks.Acceleration));

I'd prefer to get its description with fewer characters and references a la

string tmp = Tweaks.Acceleration.GetPropertyDescription();

Is this possible?
Does implementing it require trim-incompatible uses of Reflection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant