CanBeNull Property
Collapse the table of content
Expand the table of content

ColumnAttribute.CanBeNull Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets whether a column can contain null values.

Namespace:  System.Data.Linq.Mapping
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

'Declaration
Public Property CanBeNull As Boolean

Property Value

Type: System.Boolean
Default = true.

If you set this value to false, the data in the corresponding column is assumed to be non-null.

NoteNote:

This property is duplicated from the DbType property for convenience. The CreateDatabase method uses only the DbType property. For this reason, you must specify whether a column can contain null values in the DbType property also.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft