Example #1
0
        public override string ToString()
        {
            if (string.IsNullOrEmpty(Key))
            {
                throw new Exception("Empty key");
            }

            string argString = "";

            if (DashPrefix)
            {
                argString += "-";
            }

            argString += Key.AddQuotesIfContainsSpace();

            if (!string.IsNullOrEmpty(Value))
            {
                argString += "=";
                argString += Value.AddQuotesIfContainsSpace();
            }

            return(argString);
        }