C # What is '?' operator

Possible duplicate:
What does bool do? return type?

I got in my class the following property in the class

public long? EmployeeId { get; set; }

I did not look for this operator according to MSDN MSDN OPERATOR there are only operators ??operator with zero coalescing and ?:conditional operator. but what about?

+5
source share
5 answers

In this case, is ?not an operator. This is a shorter way to write:Nullable<long>

T?matches exactly Nullable<T>(with Ta type)

It is called a null type (see MSDN )

"-nullable" (, int, long, a struct) null.

, , .

+10
+6

T? System.Nullable, T - . .

:

+1

, null .

0

All Articles