File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 55
66class SomeClass
77{
8- public string SomeString { get ; set ; }
8+ public string ? SomeString { get ; set ; }
99
1010 public int SomeInt { get ; set ; }
1111
12- public int [ ] SomeInts { get ; set ; }
12+ public int [ ] ? SomeInts { get ; set ; }
1313
1414 public DateTime SomeDate { get ; set ; }
1515
@@ -68,9 +68,9 @@ private static void HowToCreateAConfig()
6868 // as long as the string value of the setting can be converted to the type you wish to obtain.
6969 string nameValue = cfg [ "SomeStructure" ] [ "SomeString" ] . StringValue ;
7070
71- int ageValue = cfg [ "SomeStructure" ] [ "SomeInt" ] . IntValue ;
71+ var ageValue = cfg [ "SomeStructure" ] [ "SomeInt" ] . IntValue ;
7272
73- DateTime dateValue = cfg [ "SomeStructure" ] [ "SomeDate" ] . DateTimeValue ;
73+ var dateValue = cfg [ "SomeStructure" ] [ "SomeDate" ] . DateTimeValue ;
7474
7575 // Print our config just to see that it works.
7676 PrintConfig ( cfg ) ;
@@ -113,7 +113,7 @@ private static void HowToCreateObjectsFromSections()
113113 // Test.
114114 Console . WriteLine ( "SomeString: " + p . SomeString ) ;
115115 Console . WriteLine ( "SomeInt: " + p . SomeInt ) ;
116- PrintArray ( "SomeInts" , p . SomeInts ) ;
116+ PrintArray ( "SomeInts" , p . SomeInts ! ) ;
117117 Console . WriteLine ( "SomeDate: " + p . SomeDate ) ;
118118 }
119119
Original file line number Diff line number Diff line change @@ -586,7 +586,7 @@ public static CultureInfo CultureInfo
586586
587587 /// <summary>
588588 /// Gets the array that contains all valid comment delimiting characters.
589- /// The current value is { '#', ';' }.
589+ /// The default value is { '#', ';' }.
590590 /// </summary>
591591 public static HashSet < char > ValidCommentChars { get ; private set ; }
592592
@@ -599,7 +599,8 @@ public static CultureInfo CultureInfo
599599 public static char PreferredCommentChar
600600 {
601601 get => s_preferredCommentChar ;
602- set {
602+ set
603+ {
603604 if ( ! ValidCommentChars . Contains ( value ) )
604605 {
605606 throw new ArgumentException ( "The specified char '" + value + "' is not allowed as a comment char." ) ;
@@ -620,7 +621,8 @@ public static char PreferredCommentChar
620621 public static char ArrayElementSeparator
621622 {
622623 get => s_arrayElementSeparator ;
623- set {
624+ set
625+ {
624626 if ( value == '\0 ' )
625627 {
626628 throw new ArgumentException ( "Zero-character is not allowed." ) ;
You can’t perform that action at this time.
0 commit comments