You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there! I'm writing some command examples for custom help output, and I had a little difficulty finding the default value for an option from the ParseResult. This is what I ended up with:
It would be very helpful I was not required to cast the option, and the method didn't throw an exception if there was no default. In that case, I could get the default value by writing something like:
object?value=opt.GetDefaultValue();
Arguments already make the method and field available. It would still be helpful to have this functionality for options too, even if it isn't possible to get around the exception.