Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: dd25fb6ebd
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (12 sloc) 0.244 kB
using System;
public static class TypeExtensions
{
public static object GetDefault(this Type type)
{
if (type.IsValueType)
{
return Activator.CreateInstance(type);
}
return null;
}
}
Jump to Line
Something went wrong with that request. Please try again.