This documentation is archived and is not being maintained.

ServiceDescriptionFormatExtensionCollection.Add Method

Adds the specified ServiceDescriptionFormatExtension to the end of the ServiceDescriptionFormatExtensionCollection.

[Visual Basic]
Public Function Add( _
   ByVal extension As Object _
) As Integer
[C#]
public int Add(
 object extension
);
[C++]
public: int Add(
 Object* extension
);
[JScript]
public function Add(
   extension : Object
) : int;

Parameters

extension
The ServiceDescriptionFormatExtension, passed by reference, to add to the ServiceDescriptionFormatExtensionCollection.

Return Value

The zero-based index where the extension parameter has been added.

Example

[Visual Basic] 
Dim mySoapBinding1 As New SoapBinding()
Dim mySoapBinding2 As New SoapBinding()
Dim mySoapAddressBinding As New SoapAddressBinding()
Dim myFormatExtensionObject As New MyFormatExtension()
' Add elements to collection.
myCollection.Add(mySoapBinding1)
myCollection.Add(mySoapAddressBinding)
myCollection.Add(mySoapBinding2)
myCollection.Add(myFormatExtensionObject)

[C#] 
SoapBinding mySoapBinding1 = new SoapBinding();
SoapBinding mySoapBinding2 = new SoapBinding();
SoapAddressBinding mySoapAddressBinding = new SoapAddressBinding();
MyFormatExtension  myFormatExtensionObject = new MyFormatExtension();
// Add elements to collection.
myCollection.Add(mySoapBinding1);
myCollection.Add(mySoapAddressBinding);
myCollection.Add(mySoapBinding2);
myCollection.Add(myFormatExtensionObject);

[C++] 
SoapBinding* mySoapBinding1 = new SoapBinding();
SoapBinding* mySoapBinding2 = new SoapBinding();
SoapAddressBinding* mySoapAddressBinding = new SoapAddressBinding();
MyFormatExtension* myFormatExtensionObject = new MyFormatExtension();
// Add elements to collection.
myCollection->Add(mySoapBinding1);
myCollection->Add(mySoapAddressBinding);
myCollection->Add(mySoapBinding2);
myCollection->Add(myFormatExtensionObject);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ServiceDescriptionFormatExtensionCollection Class | ServiceDescriptionFormatExtensionCollection Members | System.Web.Services.Description Namespace

Show: