This sample demonstrates how to use nullable types. A nullable type is a value type such asint , double , bool, and so on that can have a value of null.
To get samples and instructions for installing them
Security Note: |
|---|
|
This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties.
|
To build and run the Nullable Code sample within Visual Studio
Open Nullable.sln, the solution file, either by double-clicking the file from Windows Explorer, or by clicking Open on the File menu.
On the Debug menu, click Start Without Debugging.
To build and run the Nullable Code sample from a command prompt
Use the Change Directory (cd) command to change to the \Boxing, \Basics, or \Operator subdirectory under the Nullable directory.
For the Boxing sample, type the following:
For the Basics sample, type the following:
For the Operator sample, type the following:
Concepts
Reference