MimeTextMatchCollection::Contains Method (MimeTextMatch^)
.NET Framework (current version)
Returns a value indicating whether the specified MimeTextMatch is a member of the MimeTextMatchCollection.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- match
-
Type:
System.Web.Services.Description::MimeTextMatch^
The MimeTextMatch for which to check collection membership.
Return Value
Type: System::Booleantrue if the match parameter is a member of the MimeTextMatchCollection; otherwise, false.
The following example demonstrates the use of the Contains method.
// Get an array instance of 'MimeTextMatch' class. array<MimeTextMatch^>^myMimeTextMatch = gcnew array<MimeTextMatch^>(4); myMimeTextMatchCollection = myMimeTextBinding->Matches; // Initialize properties of 'MimeTextMatch' class. for ( myInt = 0; myInt < 4; myInt++ ) { // Create the 'MimeTextMatch' instance. myMimeTextMatch[ myInt ] = gcnew MimeTextMatch; myMimeTextMatch[ myInt ]->Name = "Title"; myMimeTextMatch[ myInt ]->Type = "*/*"; myMimeTextMatch[ myInt ]->IgnoreCase = true; if ( true == myMimeTextMatchCollection->Contains( myMimeTextMatch[ 0 ] ) ) { myMimeTextMatch[ myInt ]->Name = String::Format( "Title{0}", Convert::ToString( myInt ) ); myMimeTextMatch[ myInt ]->Capture = 2; myMimeTextMatch[ myInt ]->Group = 2; myMimeTextMatchCollection->Add( myMimeTextMatch[ myInt ] ); } else { myMimeTextMatchCollection->Add( myMimeTextMatch[ myInt ] ); myMimeTextMatchCollection[ myInt ]->RepeatsString = "2"; } } myMimeTextMatchCollection = myMimeTextBinding->Matches; // Copy collection to 'MimeTextMatch' array instance. myMimeTextMatchCollection->CopyTo( myMimeTextMatch, 0 );
.NET Framework
Available since 1.1
Available since 1.1
Show: