ScriptingOptions 构造函数 (ScriptOption)

Initializes a new instance of the ScriptingOptions class based on the specified ScriptOption object, based on the specified script option.

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

语法

声明
Public Sub New ( _
    so As ScriptOption _
)
用法
Dim so As ScriptOption 

Dim instance As New ScriptingOptions(so)
public ScriptingOptions(
    ScriptOption so
)
public:
ScriptingOptions(
    ScriptOption^ so
)
new : 
        so:ScriptOption -> ScriptingOptions
public function ScriptingOptions(
    so : ScriptOption
)

参数

示例

The following code example creates a new instance of the ScriptingOptions class.

Visual Basic

Dim scrp As New ScriptingOptions(ScriptOption.WithDependencies)

PowerShell

$scrp = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions([Microsoft.SqlServer.Management.Smo.ScriptOption]::WithDependencies)

请参阅

参考

ScriptingOptions 类

ScriptingOptions 重载

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

脚本撰写