Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MatchAttribute Constructor (String^)

 

Initializes a new instance of the MatchAttribute class with the specified pattern.

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

public:
MatchAttribute(
	String^ pattern
)

Parameters

pattern
Type: System::String^

A string that represents the pattern to match.

Use this constructor to create and initialize a new instance of the MatchAttribute class using the specified pattern.

The following table shows the initial property value for an instance of MatchAttribute.

Property

Initial Value

Pattern

The value of the pattern parameter.

public ref class Example_Headers
{
public:

   [MatchAttribute("TITLE>(.*?)<")]
   String^ Title;

   [MatchAttribute("",Pattern="h1>(.*?)<",IgnoreCase=true)]
   String^ H1;

   [MatchAttribute("H2>((([^<,]*),?)+)<",Group=3,Capture=4)]
   String^ Element;

   [MatchAttribute("H2>((([^<,]*),?){2,})<",Group=3,MaxRepeats=0)]
   array<String^>^ Elements1;

   [MatchAttribute("H2>((([^<,]*),?){2,})<",Group=3,MaxRepeats=1)]
   array<String^>^ Elements2;

   [MatchAttribute("H3 ([^=]*)=([^>]*)",Group=1)]
   String^ Attribute;

   [MatchAttribute("H3 ([^=]*)=([^>]*)",Group=2)]
   String^ Value;
};

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft