ScriptingOptions.Add ScriptingOptions.Add Method

Definition

Adds a ScriptingOption.

Overloads

Add(ScriptOption) Add(ScriptOption)

Adds a ScriptOption object to the ScriptingOptions object.

Add(ScriptingOptions, ScriptOption) Add(ScriptingOptions, ScriptOption)

Adds the specified ScriptOption and ScriptingOptions objects to the ScriptingOptions.

Add(ScriptOption) Add(ScriptOption)

Adds a ScriptOption object to the ScriptingOptions object.

public:
 Microsoft::SqlServer::Management::Smo::ScriptingOptions ^ Add(Microsoft::SqlServer::Management::Smo::ScriptOption ^ scriptOption);
public Microsoft.SqlServer.Management.Smo.ScriptingOptions Add (Microsoft.SqlServer.Management.Smo.ScriptOption scriptOption);
Parameters
scriptOption
ScriptOption ScriptOption

A ScriptOption object that is to be added to the ScriptingOptions object.

Returns

A ScriptingOptions object that contains the added ScriptOption object.

Examples

The following code example adds a new ScriptOption to the ScriptingOptions object.

Visual Basic

Dim scOps As New ScriptingOptions()  
scOps.Add(ScriptOption.WithDependencies)  

PowerShell

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

Add(ScriptingOptions, ScriptOption) Add(ScriptingOptions, ScriptOption)

Adds the specified ScriptOption and ScriptingOptions objects to the ScriptingOptions.

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

A ScriptOption object that is to be added to the ScriptingOptions object.

scriptOption
ScriptOption ScriptOption

A ScriptingOptions object that is to be added to the ScriptingOptions object.

Returns

A ScriptingOptions object that contains the added ScriptOption and ScriptingOptions objects.

Applies to