Members of System.Boolean
Next, consider the System.Boolean data type. The only valid assignment a C# bool can take is from
the set
{
true | false
}
. Given this point, it should be clear that System.Boolean does not support a
MinValue/MaxValue property set, but rather TrueString/FalseString (which yields the string "True"
or "False", respectively). Add the following code statements to the DataTypeFunctionality() helper
method:
Console.WriteLine("bool.FalseString: {0}", bool.FalseString);
Console.WriteLine("bool.TrueString: {0}", bool.TrueString);
Figure 3-8 shows the output of invoking DataTypeFunctionality() from within Main().
Figure 3-8.
Select functionality of various data types
Do'stlaringiz bilan baham: |