mardi 14 avril 2015

Nullable create via reflection with HasValue = false [duplicate]


Given a type parameter which is a Nullable<>, how can I create an instance of that type which has HasValue = false?


In other words, complete this code:



public static Nullable<T> Create<T>() where T : struct
{
//Instantatie a Nullable<T> with reflection whose HasValue = false, and return it
}





Aucun commentaire:

Enregistrer un commentaire