C# default Generic Value
Description
The default keyword can be used to get the default value given a generic type parameter.
The default value for a reference type is null, and the default value for a value type is the result of bitwise-zeroing the value type's fields:
Example
Example for default Generic Value
static void Zap<T> (T[] array)
{/* w w w . j a v a2 s . c o m*/
for (int i = 0; i < array.Length; i++)
array[i] = default(T);
}