File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ To read these values, your C# code would look like:
4848var config = Configuration .LoadFromFile (" sample.cfg" );
4949var section = config [" General" ];
5050
51- string someString = section [" SomeString" ].StringValue ;
52- int someInteger = section [" SomeInteger" ].IntValue ;
53- float someFloat = section [" SomeFloat" ].FloatValue ;
54- bool someBool = section [" SomeBoolean" ].BoolValue ;
55- int [] someIntArray = section [" SomeArray" ].IntValueArray ;
56- string [] someStringArray = section [" SomeArray" ].StringValueArray ;
57- DayOfWeek day = section [" Day" ].GetValue <DayOfWeek >();
51+ string someString = section [" SomeString" ].StringValue ;
52+ int someInteger = section [" SomeInteger" ].IntValue ;
53+ float someFloat = section [" SomeFloat" ].FloatValue ;
54+ bool someBool = section [" SomeBoolean" ].BoolValue ;
55+ int [] someIntArray = section [" SomeArray" ].IntValueArray ;
56+ string [] someStringArray = section [" SomeArray" ].StringValueArray ;
57+ DayOfWeek day = section [" Day" ].GetValue <DayOfWeek >();
5858
5959// Entire user-defined objects can be created from sections and vice versa.
6060var person = config [" Person" ].ToObject <Person >();
You can’t perform that action at this time.
0 commit comments