This documentation is archived and is not being maintained.

MimeTextMatch::Capture Property

Gets or sets a value indicating the zero-based index of a MimeTextMatch within a group.

Namespace:  System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
property int Capture {
	int get ();
	void set (int value);
}

Property Value

Type: System::Int32
A 32-bit signed integer. The default value is 0, indicating that the MimeTextMatch is the first instance within a group.

ExceptionCondition
ArgumentException

The property value is negative.

For more information, see the Group and Matches properties.

No code example is currently available or this language may not be supported.
// Create an InputBinding.
InputBinding* myInputBinding = new InputBinding();
MimeTextBinding* myMimeTextBinding = new MimeTextBinding();
MimeTextMatchCollection* myMimeTextMatchCollection1 =
   new MimeTextMatchCollection();
MimeTextMatch* myMimeTextMatch[] = new MimeTextMatch*[3];
myMimeTextMatchCollection1 = myMimeTextBinding->Matches;

// Intialize the MimeTextMatch.
for( myInt = 0 ; myInt < 3 ; myInt++ )
{
   // Get a new MimeTextMatch.
   myMimeTextMatch[ myInt ] = new MimeTextMatch();

   // Assign values to properties of the MimeTextMatch.
   myMimeTextMatch[ myInt ]->Name = String::Format( S"Title{0}", Convert::ToString(myInt) );
   myMimeTextMatch[ myInt ]->Type = S"*/*";
   myMimeTextMatch[ myInt ]->Pattern = S"TITLE&gt;(.*?)&lt;";
   myMimeTextMatch[ myInt ]->IgnoreCase = true;
   myMimeTextMatch[ myInt ]->Capture = 2;
   myMimeTextMatch[ myInt ]->Group = 2;
   if( myInt != 0 )
   {
      // Assign the Repeats property if the index is not 0.
      myMimeTextMatch[ myInt ]->Repeats = 2;
   }
   else
   {
      // Assign the RepeatsString property if the index is 0.
      myMimeTextMatch[ myInt ]->RepeatsString = S"4";
   }
   // Add the MimeTextMatch to the collection.
   myMimeTextMatchCollection1->Add( myMimeTextMatch[ myInt ] );
}

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: