共用方式為


DiscoveryExceptionDictionary.Keys 屬性

定義

取得具有 ICollection 中所有索引鍵的 DiscoveryExceptionDictionary 物件。

public:
 property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };
public System.Collections.ICollection Keys { get; }
member this.Keys : System.Collections.ICollection
Public ReadOnly Property Keys As ICollection

屬性值

ICollection

ICollection,包含 DiscoveryExceptionDictionary 的索引鍵。

範例

array<Object^>^myArray = gcnew array<Object^>(myExceptionDictionary->Count);
myExceptionDictionary->Keys->CopyTo( (Array^)myArray, 0 );
Console::WriteLine( " Keys are :" );

for each(Object^ myObj in myArray)
{
   Console::WriteLine(" " + myObj->ToString());
}
object[] myArray = new object[myExceptionDictionary.Count];
myExceptionDictionary.Keys.CopyTo((Array)myArray,0);
Console.WriteLine(" Keys are :");
foreach(object myObj in myArray)
{
   Console.WriteLine(" " + myObj.ToString());
}
Dim myArray(myExceptionDictionary.Count -1 ) As Object
myExceptionDictionary.Keys.CopyTo(CType(myArray, Array), 0)
Console.WriteLine(" Keys are :")
Dim myObj As Object
For Each myObj In  myArray
   Console.WriteLine(" " + myObj.ToString())
Next myObj

適用於

另請參閱