ServiceDescriptionFormatExtensionCollection.Add(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified ServiceDescriptionFormatExtension to the end of the ServiceDescriptionFormatExtensionCollection.
public:
int Add(System::Object ^ extension);
public int Add (object extension);
member this.Add : obj -> int
Public Function Add (extension As Object) As Integer
Parameters
- extension
- Object
The ServiceDescriptionFormatExtension, passed by reference, to add to the ServiceDescriptionFormatExtensionCollection.
Returns
The zero-based index where the ServiceDescriptionFormatExtension has been added.
Examples
SoapBinding^ mySoapBinding1 = gcnew SoapBinding;
SoapBinding^ mySoapBinding2 = gcnew SoapBinding;
SoapAddressBinding^ mySoapAddressBinding = gcnew SoapAddressBinding;
MyFormatExtension^ myFormatExtensionObject = gcnew MyFormatExtension;
// Add elements to collection.
myCollection->Add( mySoapBinding1 );
myCollection->Add( mySoapAddressBinding );
myCollection->Add( mySoapBinding2 );
myCollection->Add( myFormatExtensionObject );
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);
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)
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.