Changeset 14991 for lang/csharp

Show
Ignore:
Timestamp:
07/01/08 16:23:01 (5 months ago)
Author:
mayuki
Message:

ShowHelpがDefaultvalue?(null)で死ぬのをとりあえず修正。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/csharp/CommandLineParser/CommandLineParser/CommandLineParser.cs

    r14990 r14991  
    103103                Object defaultValue; 
    104104                Boolean hasDefaultValue = GetDefaultValue(pi, out defaultValue); 
    105                 String defaultOrRequired = (hasDefaultValue ? "(Default: " + defaultValue.ToString() + ")" : "(Required)"); 
     105                String defaultOrRequired = (hasDefaultValue ? String.Format("(Default: {0})", defaultValue) : "(Required)"); 
    106106                String[] optionNames = GetOptionNames(pi); 
    107107                String optionName = (DelimiterizeAndToLowerCase ? ToLowerAndDelimiterize(optionNames[0]) : optionNames[0]);