natemcmaster / CommandLineUtils

Command line parsing and utilities for .NET

Home Page:https://natemcmaster.github.io/CommandLineUtils/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Defining Options in Base Class and using them in derived class

krishnad1982 opened this issue · comments

In my application, I have a base class that defines one argument representing commands I want to use in multiple derived classes. However, when I insert the command-line arguments and run my application, these options are null. Their values always need to be set.
I tried the solution described for the Options. I declared a 'Parent' property in the derived class, but that populates as null. However, the below workaround is working
var args= app.Parent.Arguments;
Is anything similar to Options available to access parent Arguments in the derived class?

This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please comment if you believe this should remain open, otherwise it will be closed in 14 days. Thank you for your contributions to this project.

Closing due to inactivity.
If you are looking at this issue in the future and think it should be reopened, please make a commented here and mention natemcmaster so he sees the notification.