static MethodInfo GetNullableValueMethod(this Type type) { type = type.GetNonNullableType(); return(NullableMethods.GetOrAdd(type, key => GetNullableValueMethodMethod.MakeGenericMethod(key) //NullableType.MakeGenericType(key).GetProperty("Value").GetGetMethod() )); }