Méthode Remove

Removes a ScriptOption object from the ScriptingOptions object.

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
Public Function Remove ( _
    scriptOption As ScriptOption _
) As ScriptingOptions
'Utilisation
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

Paramètres

Valeur de retour

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

Exemples

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)