DataType 构造函数 (SqlDataType, String)

Initializes a new instance of the DataType class based on a specified SQL Server data type with the specified type.

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
Public Sub New ( _
    sqlDataType As SqlDataType, _
    type As String _
)
用法
Dim sqlDataType As SqlDataType 
Dim type As String 

Dim instance As New DataType(sqlDataType, _
    type)
public DataType(
    SqlDataType sqlDataType,
    string type
)
public:
DataType(
    SqlDataType sqlDataType, 
    String^ type
)
new : 
        sqlDataType:SqlDataType * 
        type:string -> DataType
public function DataType(
    sqlDataType : SqlDataType, 
    type : String
)

参数

示例

Visual Basic

'Declare and create a DataType object variable.
Dim dt As DataType
dt = New DataType(SqlDataType.

PowerShell

$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::

请参阅

参考

DataType 类

DataType 重载

Microsoft.SqlServer.Management.Smo 命名空间