static ConstrainedPropertyViewModel() { Type t = typeof(T); if (t.Name != "Nullable`1") { return; } // We could do a dynamicmethod here for call speed, but it's probably not needed. RawType = t.GetGenericArguments()[0]; Comparer = RawType.GetMethod("CompareTo", new[] { RawType }); NullableConverter = new NullableConverter(t); }