You can add a member to MyResourceCustom that wraps Description, DefaultValue, and MyCustomAttribute in an immutable instance (possibly even a static global one, if it can be the same for everyone).
public class MyResourceCustom : Attribute { public MyResourceCustomDescriptor Descriptor { get; private set; } public MyResourceCustom(MyResourceCustomDescriptor descriptor) : base() { Descriptor = descriptor; } public class MyResourceCustomDescriptor { public string Description { get; private set; } public bool DefaultValue { get; private set; } public ParameterGroups ParameterGroup { get; private set; } public MyResourceCustomDescriptor(string path) {
When retrieving an attribute, you can get its Descriptor property and read the values.
As an alert, you should call it IsDefaultValue .
source share