MimePartCollection.Contains(MimePart) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 MimePart이 MimePartCollection의 멤버인지 여부를 나타내는 값을 반환합니다.
public:
bool Contains(System::Web::Services::Description::MimePart ^ mimePart);
public bool Contains (System.Web.Services.Description.MimePart mimePart);
member this.Contains : System.Web.Services.Description.MimePart -> bool
Public Function Contains (mimePart As MimePart) As Boolean
매개 변수
반환
mimePart
매개 변수가 MimePartCollection
의 멤버이면 true
이고, 그렇지 않으면 false
입니다.
예제
다음 예제에서는의 일반적인 용도 Contains
메서드.
MimePart^ myMimePart2 = gcnew MimePart;
MimeXmlBinding^ myMimeXmlBinding2 = gcnew MimeXmlBinding;
myMimeXmlBinding2->Part = "body";
myMimePart2->Extensions->Add( myMimeXmlBinding2 );
// Add a mimepart to the mimepartcollection.
myMimePartCollection->Add( myMimePart2 );
Console::WriteLine( "Adding a mimepart object..." );
// Check if collection contains added mimepart object.
if ( myMimePartCollection->Contains( myMimePart2 ) )
Console::WriteLine( "'MimePart' is successfully added at position: {0}", myMimePartCollection->IndexOf( myMimePart2 ) );
MimePart myMimePart2=new MimePart();
MimeXmlBinding myMimeXmlBinding2 = new MimeXmlBinding();
myMimeXmlBinding2.Part = "body";
myMimePart2.Extensions.Add(myMimeXmlBinding2);
// Add a mimepart to the mimepartcollection.
myMimePartCollection.Add(myMimePart2);
Console.WriteLine("Adding a mimepart object...");
// Check if collection contains added mimepart object.
if(myMimePartCollection.Contains(myMimePart2))
{
Console.WriteLine("'MimePart' is successfully added at position: "
+myMimePartCollection.IndexOf(myMimePart2));
}
Dim myMimePart2 As New MimePart()
Dim myMimeXmlBinding2 As New MimeXmlBinding()
myMimeXmlBinding2.Part = "body"
myMimePart2.Extensions.Add(myMimeXmlBinding2)
' Add a mimepart to the mimepartcollection.
myMimePartCollection.Add(myMimePart2)
Console.WriteLine("Adding a mimepart object...")
' Check if collection contains added mimepart object.
If myMimePartCollection.Contains(myMimePart2) Then
Console.WriteLine("'MimePart' is successfully added at position: " + _
myMimePartCollection.IndexOf(myMimePart2).ToString())
End If