System.Nullable<T> variable
-or-
T? variable
T
es el tipo de dato del tipo nullable. T
puede ser cualquier tipo de variable incluyendo un struct; sin embarbo no puede ser un tipo referencia.ejemplo:
int? i = 10;
double? d1 = 3.14;
bool? flag = null;
char? letter = 'a';
int?[] arr = new int?[10];
fuente: http://msdn.microsoft.com/en-us/library/2cf62fcy(v=vs.80).aspx
No hay comentarios:
Publicar un comentario
Gracias por tus aportes, críticas y preguntas