Share via


UserDefinedDataType.Length Property

Gets or sets the number of characters in the user-defined data type.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Design)> _
Public Property Length As Integer 
    Get 
    Set
'Usage
Dim instance As UserDefinedDataType 
Dim value As Integer 

value = instance.Length

instance.Length = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)]
public int Length { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::ReadOnlyAfterCreation|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase|SfcPropertyFlags::Design)]
public:
property int Length {
    int get ();
    void set (int value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)>]
member Length : int with get, set
function get Length () : int 
function set Length (value : int)

Property Value

Type: System.Int32
An Int32 value that specifies the maximum number of characters permitted in the user-defined data type.

Examples

Working with Data Types

See Also

Reference

UserDefinedDataType Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Data Types (Database Engine)

CREATE TYPE (Transact-SQL)