public bool HasValue { get; }
Public ReadOnly Property HasValue As Boolean
Get
Dim instance As CommandLineArgument
Dim value As Boolean
value = instance.HasValue
public:
property bool HasValue {
bool get ();
}
Use this property to determine whether or not an argument was supplied on the command line, or was assigned its default value.
When an optional argument is not supplied on the command line, the Value property will be equal to the DefaultValue property, and HasValue will be .
It is however possible for the user to supply a value on the command line that matches the default value. In that case, although the Value property will still be equal to the DefaultValue property, the HasValue property will be . This allows you to distinguish between an argument that was supplied or omitted even if the supplied value matches the default.