2using System.Collections.Generic;
16 public static string ToYesNo(
this bool Value)
18 return Value ?
"Yes" :
"No";
28 if (Value == DateTime.MinValue || Value == DateTime.MaxValue)
32 string s = Value.ToShortDateString() +
", " + Value.ToLongTimeString();
34 if (Value.Kind == DateTimeKind.Utc)
50 Value[] Result =
new Value[Dictionary.Count];
51 Dictionary.Values.CopyTo(Result, 0);
64 Key[] Result =
new Key[Dictionary.Count];
65 Dictionary.Keys.CopyTo(Result, 0);
Static class with simple type extensions.
static Value[] ToValueArray< Key, Value >(this IDictionary< Key, Value > Dictionary)
Returns an array of values.
static string ToStringTZ(this DateTime Value)
Converts a DateTime value to a string, optionally adding a Z if UTC time coordinates are used.
static string ToYesNo(this bool Value)
Converts a boolean value to either "Yes" or "No".
static Key[] ToKeyArray< Key, Value >(this IDictionary< Key, Value > Dictionary)
Returns an array of keys.