ScriptingOptions.Add 方法 (ScriptOption)
Adds a ScriptOption object to the ScriptingOptions object.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public Function Add ( _
scriptOption As ScriptOption _
) As ScriptingOptions
'用途
Dim instance As ScriptingOptions
Dim scriptOption As ScriptOption
Dim returnValue As ScriptingOptions
returnValue = instance.Add(scriptOption)
public ScriptingOptions Add(
ScriptOption scriptOption
)
public:
ScriptingOptions^ Add(
ScriptOption^ scriptOption
)
member Add :
scriptOption:ScriptOption -> ScriptingOptions
public function Add(
scriptOption : ScriptOption
) : ScriptingOptions
參數
- scriptOption
型別:Microsoft.SqlServer.Management.Smo.ScriptOption
A ScriptOption object that is to be added to the ScriptingOptions object.
傳回值
型別:Microsoft.SqlServer.Management.Smo.ScriptingOptions
A ScriptingOptions object that contains the added ScriptOption object.
範例
The following code example adds a new ScriptOption to the ScriptingOptions object.
Visual Basic
Dim scOps As New ScriptingOptions()
scOps.Add(ScriptOption.WithDependencies)
PowerShell
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.Add([Microsoft.SqlServer.Management.Smo.ScriptOption]::WithDependencies)
請參閱
參考
Microsoft.SqlServer.Management.Smo 命名空間