Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft den Wert des Members der MimeTextMatchCollection am angegebenen nullbasierten Index ab oder legt diesen fest.
Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)
Syntax
'Declaration
Public Default Property Item ( _
index As Integer _
) As MimeTextMatch
'Usage
Dim instance As MimeTextMatchCollection
Dim index As Integer
Dim value As MimeTextMatch
value = instance(index)
instance(index) = value
public MimeTextMatch this [
int index
] { get; set; }
public:
property MimeTextMatch^ default [int] {
MimeTextMatch^ get (int index);
void set (int index, MimeTextMatch^ value);
}
/** @property */
public MimeTextMatch get_Item (int index)
/** @property */
public void set_Item (int index, MimeTextMatch value)
JScript unterstützt die Verwendung von indizierten Eigenschaften, aber nicht die Deklaration von neuen indizierten Eigenschaften.
Parameter
- index
Der nullbasierte Index des MimeTextMatch, dessen Wert zurückgegeben oder geändert wird.
Eigenschaftenwert
Ein MimeTextMatch.
Beispiel
Im folgenden Beispiel wird die Verwendung eines nullbasierten Index zum Abrufen eines Members von MimeTextMatchCollection veranschaulicht.
' Get an instance of 'MimeTextMatchCollection'.
Dim myMimeTextMatchCollection1 As New MimeTextMatchCollection()
Dim myMimeTextMatch1(4) As MimeTextMatch
myMimeTextMatchCollection1 = myMimeTextBinding1.Matches
For myInt = 0 To 3
myMimeTextMatch1(myInt) = New MimeTextMatch()
myMimeTextMatch1(myInt).Name = "Title" + Convert.ToString(myInt)
If myInt <> 0 Then
myMimeTextMatch1(myInt).RepeatsString = "7"
End If
myMimeTextMatchCollection1.Add(myMimeTextMatch1(myInt))
Next myInt
myMimeTextMatch1(4) = New MimeTextMatch()
' Remove 'MimeTextMatch' instance from collection.
myMimeTextMatchCollection1.Remove(myMimeTextMatch1(1))
' Using MimeTextMatchCollection.Item indexer to comapre.
If myMimeTextMatch1(2) Is myMimeTextMatchCollection1(1) Then
' Check whether 'MimeTextMatch' instance exists.
myInt = myMimeTextMatchCollection1.IndexOf(myMimeTextMatch1(2))
' Insert 'MimeTextMatch' instance at a desired position.
myMimeTextMatchCollection1.Insert(1, myMimeTextMatch1(myInt))
myMimeTextMatchCollection1(1).RepeatsString = "5"
myMimeTextMatchCollection1.Insert(4, myMimeTextMatch1(myInt))
End If
// Get an instance of 'MimeTextMatchCollection'.
MimeTextMatchCollection myMimeTextMatchCollection1 = new MimeTextMatchCollection();
MimeTextMatch[] myMimeTextMatch1 = new MimeTextMatch[5];
myMimeTextMatchCollection1 = myMimeTextBinding1.Matches;
for( myInt = 0 ; myInt < 4 ; myInt++ )
{
myMimeTextMatch1[ myInt ] = new MimeTextMatch();
myMimeTextMatch1[ myInt ].Name = "Title" + Convert.ToString( myInt );
if( myInt != 0 )
{
myMimeTextMatch1[ myInt ].RepeatsString = "7";
}
myMimeTextMatchCollection1.Add( myMimeTextMatch1[ myInt ] );
}
myMimeTextMatch1[4] = new MimeTextMatch();
// Remove 'MimeTextMatch' instance from collection.
myMimeTextMatchCollection1.Remove( myMimeTextMatch1[ 1 ] );
// Using MimeTextMatchCollection.Item indexer to comapre.
if( myMimeTextMatch1[ 2 ] == myMimeTextMatchCollection1[ 1 ] )
{
// Check whether 'MimeTextMatch' instance exists.
myInt = myMimeTextMatchCollection1.IndexOf( myMimeTextMatch1[ 2 ] );
// Insert 'MimeTextMatch' instance at a desired position.
myMimeTextMatchCollection1.Insert( 1, myMimeTextMatch1[ myInt ] );
myMimeTextMatchCollection1[ 1 ].RepeatsString = "5";
myMimeTextMatchCollection1.Insert( 4, myMimeTextMatch1[ myInt ] );
}
// Get an instance of 'MimeTextMatchCollection'.
MimeTextMatchCollection^ myMimeTextMatchCollection1 = gcnew MimeTextMatchCollection;
array<MimeTextMatch^>^myMimeTextMatch1 = gcnew array<MimeTextMatch^>(5);
myMimeTextMatchCollection1 = myMimeTextBinding1->Matches;
for ( myInt = 0; myInt < 4; myInt++ )
{
myMimeTextMatch1[ myInt ] = gcnew MimeTextMatch;
myMimeTextMatch1[ myInt ]->Name = String::Format( "Title{0}", Convert::ToString( myInt ) );
if ( myInt != 0 )
{
myMimeTextMatch1[ myInt ]->RepeatsString = "7";
}
myMimeTextMatchCollection1->Add( myMimeTextMatch1[ myInt ] );
}
myMimeTextMatch1[ 4 ] = gcnew MimeTextMatch;
// Remove 'MimeTextMatch' instance from collection.
myMimeTextMatchCollection1->Remove( myMimeTextMatch1[ 1 ] );
// Using MimeTextMatchCollection.Item indexer to comapre.
if ( myMimeTextMatch1[ 2 ] == myMimeTextMatchCollection1[ 1 ] )
{
// Check whether 'MimeTextMatch' instance exists.
myInt = myMimeTextMatchCollection1->IndexOf( myMimeTextMatch1[ 2 ] );
// Insert 'MimeTextMatch' instance at a desired position.
myMimeTextMatchCollection1->Insert( 1, myMimeTextMatch1[ myInt ] );
myMimeTextMatchCollection1[ 1 ]->RepeatsString = "5";
myMimeTextMatchCollection1->Insert( 4, myMimeTextMatch1[ myInt ] );
}
// Get an instance of 'MimeTextMatchCollection'.
MimeTextMatchCollection myMimeTextMatchCollection1 =
new MimeTextMatchCollection();
MimeTextMatch myMimeTextMatch1[] = new MimeTextMatch[5];
myMimeTextMatchCollection1 = myMimeTextBinding1.get_Matches();
for (myInt = 0; myInt < 4; myInt++) {
myMimeTextMatch1.set_Item(myInt, new MimeTextMatch());
((MimeTextMatch)myMimeTextMatch1.get_Item(myInt)).
set_Name("Title" + Convert.ToString(myInt));
if (myInt != 0) {
((MimeTextMatch)myMimeTextMatch1.get_Item(myInt)).
set_RepeatsString("7");
}
myMimeTextMatchCollection1.Add(myMimeTextMatch1.get_Item(myInt));
}
myMimeTextMatch1.set_Item(4, new MimeTextMatch());
// Remove 'MimeTextMatch' instance from collection.
myMimeTextMatchCollection1.Remove(myMimeTextMatch1.get_Item(1));
// Using MimeTextMatchCollection.Item indexer to comapre.
if (myMimeTextMatch1.get_Item(2).Equals(
myMimeTextMatchCollection1.get_Item(1))) {
// Check whether 'MimeTextMatch' instance exists.
myInt = myMimeTextMatchCollection1.
IndexOf(myMimeTextMatch1.get_Item(2));
// Insert 'MimeTextMatch' instance at a desired position.
myMimeTextMatchCollection1.Insert(1, myMimeTextMatch1.
get_Item(myInt));
myMimeTextMatchCollection1.get_Item(1).set_RepeatsString("5");
myMimeTextMatchCollection1.Insert(4, myMimeTextMatch1.
get_Item(myInt));
}
Plattformen
Windows 98, Windows 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
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
MimeTextMatchCollection-Klasse
MimeTextMatchCollection-Member
System.Web.Services.Description-Namespace