共用方式為


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 命名空間

其他資源

指令碼