共用方式為


Remove 方法

Removes a ScriptOption object from the ScriptingOptions object.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Function Remove ( _
    scriptOption As ScriptOption _
) As ScriptingOptions
'用途
Dim instance As ScriptingOptions
Dim scriptOption As ScriptOption
Dim returnValue As ScriptingOptions

returnValue = instance.Remove(scriptOption)
public ScriptingOptions Remove(
    ScriptOption scriptOption
)
public:
ScriptingOptions^ Remove(
    ScriptOption^ scriptOption
)
member Remove : 
        scriptOption:ScriptOption -> ScriptingOptions 
public function Remove(
    scriptOption : ScriptOption
) : ScriptingOptions

參數

傳回值

型別:Microsoft.SqlServer.Management.Smo. . :: . .ScriptingOptions
A ScriptingOptions object that does not contain the removed ScriptOption object.

範例

The following code example removes a script option.

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.WithDependencies = true
scOps.Remove(ScriptOption.WithDependencies)

PowerShell

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