Condividi tramite


Operatore Subtraction

Creates a set of scripting options by performing an subtraction operation on a ScriptingOptions object and a ScriptOption object.

Spazio dei nomi  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Sintassi

'Dichiarazione
Public Shared Operator - ( _
    options As ScriptingOptions, _
    scriptOption As ScriptOption _
) As ScriptingOptions
'Utilizzo
Dim options As ScriptingOptions
Dim scriptOption As ScriptOption
Dim returnValue As ScriptingOptions

returnValue = (options - scriptOption)
public static ScriptingOptions operator -(
    ScriptingOptions options,
    ScriptOption scriptOption
)
public:
static ScriptingOptions^ operator -(
    ScriptingOptions^ options, 
    ScriptOption^ scriptOption
)
static let inline (-)
        options:ScriptingOptions * 
        scriptOption:ScriptOption  : ScriptingOptions
JScript supporta l'utilizzo di operatori di overload , ma non la dichiarazione di nuovi operatori.

Parametri

Valore restituito

Tipo: Microsoft.SqlServer.Management.Smo. . :: . .ScriptingOptions
A ScriptingOptions object value that specifies a set of scripting options after the subtraction.

Esempi

The following code example creates a new set of script options by subtracting a ScriptOption value from an existing ScriptingOptions object.

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.NoXmlNamespaces = $TRUE
$scOps.Permissions = $TRUE
$scOps2 = [Microsoft.SqlServer.Management.Smo.ScriptingOptions]::op_Subtraction($scOps, [Microsoft.SqlServer.Management.Smo.ScriptOption]::Permissions)