ScriptingOptions.Addition(ScriptingOptions, ScriptOption) ScriptingOptions.Addition(ScriptingOptions, ScriptOption) Operator

Definition

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

public:
 static Microsoft::SqlServer::Management::Smo::ScriptingOptions ^ operator +(Microsoft::SqlServer::Management::Smo::ScriptingOptions ^ options, Microsoft::SqlServer::Management::Smo::ScriptOption ^ scriptOption);
public static Microsoft.SqlServer.Management.Smo.ScriptingOptions operator + (Microsoft.SqlServer.Management.Smo.ScriptingOptions options, Microsoft.SqlServer.Management.Smo.ScriptOption scriptOption);
Parameters
options
ScriptingOptions ScriptingOptions

A ScriptingOptions object that specifies the scripting options.

scriptOption
ScriptOption ScriptOption

A ScriptOption object that specifies the script option.

Returns

A ScriptingOptions object value that specifies a set of scripting options after the addition.

Examples

The following code example creates a new set of script options by adding a ScriptOption value to 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_Addition($scOps, [Microsoft.SqlServer.Management.Smo.ScriptOption]::WithDependencies)  

Applies to