Null

The Null property specifies whether an array or pointer value may be null. This property is allowed on Pre and Post attributes and can be applied only to arrays and pointer data types.

The Null property must be set using one of the following values:

  • SA_Yes - the value is null.

  • SA_No - the value is not null.

  • SA_Maybe - the value may be null.

Note

The SA_ prefix is optional for C++.

Example

The following code shows how to use the Null property:

// C 
#include <CodeAnalysis\SourceAnnotations.h>
void f([SA_Pre(Null=SA_No)] char** pc);

// C++
#include <CodeAnalysis\SourceAnnotations.h>
using namespace vc_attributes;
void f([Pre(Null=No)] char** pc);

See Also

Concepts

Annotation Overview

Other Resources

Annotation Properties