A nullable type can be specified two different ways. First, you can explicitly declare
namespace. For example, this
PART I
C h a p t e r 2 0 :
U n s a f e C o d e , P o i n t e r s , N u l l a b l e T y p e s , a n d M i s c e l l a n e o u s T o p i c s
599
PART IPART I
The second way to declare a nullable type is much shorter and is more commonly used.
Simply follow the type name with a
?
. For example, the following shows the more common
way to declare a nullable
Do'stlaringiz bilan baham: