Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 1.42 KB

File metadata and controls

34 lines (30 loc) · 1.42 KB
title null (C# Reference)
ms.date 07/20/2015
ms.prod .net
ms.technology
devlang-csharp
ms.topic article
f1_keywords
null
null_CSharpKeyword
helpviewer_keywords
null keyword [C#]
ms.assetid fecb1c60-6232-4efe-87f7-9a86ba2e9119
caps.latest.revision 17
author BillWagner
ms.author wiwagn

null (C# Reference)

The null keyword is a literal that represents a null reference, one that does not refer to any object. null is the default value of reference-type variables. Ordinary value types cannot be null. However, C# 2.0 introduced nullable value types. See Nullable Types.

The following example demonstrates some behaviors of the null keyword:

[!code-csharpcsrefKeywordsLiteral#1]

C# Language Specification

[!INCLUDECSharplangspec]

See Also

C# Reference
C# Programming Guide
C# Keywords
Literal Keywords
Default Values Table
Nothing