Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

NoteNote

The SA_ prefix is optional for C++.

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);
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.