DataFileCollection.Remove DataFileCollection.Remove DataFileCollection.Remove Method

Definition

Removes a DataFile object from the DataFileCollection collection.

Overloads

Remove(DataFile) Remove(DataFile)

Removes a DataFile object from the DataFileCollection collection by specifying the object.

Remove(String) Remove(String) Remove(String)

Removes a DataFile object from the DataFileCollection collection by specifying the name of the data file.

Remove(DataFile) Remove(DataFile)

Removes a DataFile object from the DataFileCollection collection by specifying the object.

public:
 void Remove(Microsoft::SqlServer::Management::Smo::DataFile ^ dataFile);
public void Remove (Microsoft.SqlServer.Management.Smo.DataFile dataFile);
Parameters
dataFile
DataFile DataFile DataFile

A DataFile object to be removed from the DataFileCollection collection.

Examples

Using Collections

Remove(String) Remove(String) Remove(String)

Removes a DataFile object from the DataFileCollection collection by specifying the name of the data file.

public:
 void Remove(System::String ^ name);
public void Remove (string name);
Public Sub Remove (name As String)
Parameters
name
String String String

A String that specifies the name of the data file to be removed from the DataFileCollection collection.

Examples

Using Collections

Applies to