MimeTextMatch.Group Property

Gets or sets a value indicating the number of groups in which to place the results of the text search.

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

public:
property int Group {
	int get ();
	void set (int value);
}
/** @property */
public int get_Group ()

/** @property */
public void set_Group (int value)

public function get Group () : int

public function set Group (value : int)

Not applicable.

Property Value

A 32-bit signed integer. The default value is 1.

Exception typeCondition

ArgumentException

The property value is negative.

The value of this property must be less than or equal to the value of the Repeats property, or the XML Web service will not compile correctly.

// Create an InputBinding.
InputBinding^ myInputBinding = gcnew InputBinding;
MimeTextBinding^ myMimeTextBinding = gcnew MimeTextBinding;
MimeTextMatchCollection^ myMimeTextMatchCollection1 = gcnew MimeTextMatchCollection;
array<MimeTextMatch^>^myMimeTextMatch = gcnew array<MimeTextMatch^>(3);
myMimeTextMatchCollection1 = myMimeTextBinding->Matches;

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

   // Assign values to properties of the MimeTextMatch.
   myMimeTextMatch[ myInt ]->Name = String::Format( "Title{0}", Convert::ToString( myInt ) );
   myMimeTextMatch[ myInt ]->Type = "*/*";
   myMimeTextMatch[ myInt ]->Pattern = "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 = "4";
   }
   myMimeTextMatchCollection1->Add( myMimeTextMatch[ myInt ] );

}

// Create an InputBinding.
InputBinding myInputBinding = new InputBinding();
MimeTextBinding myMimeTextBinding = new MimeTextBinding();
MimeTextMatchCollection myMimeTextMatchCollection1 = 
    new MimeTextMatchCollection();
MimeTextMatch myMimeTextMatch[] = new MimeTextMatch[3];
myMimeTextMatchCollection1 = myMimeTextBinding.get_Matches();

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

    // Assign values to properties of the MimeTextMatch.
    ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).
        set_Name("Title" + Convert.ToString(myInt));
    ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).
        set_Type("*/*");
    ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).
        set_Pattern("TITLE&gt;(.*?)&lt;");
    ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).
        set_IgnoreCase(true);
    ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).set_Capture(2);
    ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).set_Group(2);
    if (myInt != 0) {
        // Assign the Repeats property if the index is not 0.
        ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).
            set_Repeats(2);
    }
    else {
        // Assign the RepeatsString property if the index is 0.
        ((MimeTextMatch)myMimeTextMatch.get_Item(myInt)).
            set_RepeatsString("4");
    }
    // Add the MimeTextMatch to the collection.
    myMimeTextMatchCollection1.Add(myMimeTextMatch.get_Item(myInt));
}

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: