ScriptingOptions.Subtraction 运算符
Creates a set of scripting options by performing an subtraction operation on a ScriptingOptions object and a ScriptOption object.
命名空间: Microsoft.SqlServer.Management.Smo
程序集: Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)
语法
声明
Public Shared Operator - ( _
options As ScriptingOptions, _
scriptOption As ScriptOption _
) As ScriptingOptions
用法
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 支持使用重载的运算符,但不支持声明新重载运算符。
参数
- options
类型:Microsoft.SqlServer.Management.Smo.ScriptingOptions
A ScriptingOptions object that specifies the scripting options.
- scriptOption
类型:Microsoft.SqlServer.Management.Smo.ScriptOption
A ScriptOption object that specifies the script option to be subtracted from the options specified by the options parameter..
返回值
类型:Microsoft.SqlServer.Management.Smo.ScriptingOptions
A ScriptingOptions object value that specifies a set of scripting options after the subtraction.
示例
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)
请参阅
参考
Microsoft.SqlServer.Management.Smo 命名空间