|
Dieser Artikel wurde maschinell übersetzt. Bewegen Sie den Mauszeiger über die Sätze im Artikel, um den Originaltext anzuzeigen. Weitere Informationen
|
Übersetzung
Original
|
Guid-Struktur
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Der Guid-Typ macht die folgenden Member verfügbar.
| Name | Beschreibung | |
|---|---|---|
![]() ![]() ![]() ![]() | Guid(Byte[]) | |
![]() ![]() ![]() ![]() | Guid(String) | |
![]() ![]() ![]() ![]() | Guid(Int32, Int16, Int16, Byte[]) | |
![]() ![]() ![]() ![]() | Guid(Int32, Int16, Int16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte) | |
![]() | Guid(UInt32, UInt16, UInt16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte) |
| Name | Beschreibung | |
|---|---|---|
![]() ![]() ![]() ![]() | CompareTo(Guid) | |
![]() ![]() | CompareTo(Object) | |
![]() ![]() ![]() ![]() | Equals(Guid) | |
![]() ![]() ![]() ![]() | Equals(Object) | |
![]() ![]() ![]() ![]() | GetHashCode | |
![]() ![]() ![]() ![]() | GetType | |
![]() ![]() ![]() ![]() ![]() | NewGuid | |
![]() ![]() ![]() ![]() | Parse | |
![]() ![]() ![]() ![]() | ParseExact | |
![]() ![]() ![]() ![]() | ToByteArray | |
![]() ![]() ![]() ![]() | ToString() | |
![]() ![]() ![]() ![]() | ToString(String) | |
![]() ![]() | ToString(String, IFormatProvider) | |
![]() ![]() ![]() ![]() | TryParse | |
![]() ![]() ![]() ![]() | TryParseExact |
| Name | Beschreibung | |
|---|---|---|
![]() ![]() ![]() ![]() ![]() | Equality | |
![]() ![]() ![]() ![]() ![]() | Inequality |
| Name | Beschreibung | |
|---|---|---|
![]() ![]() ![]() ![]() ![]() | Empty |
| Name | Beschreibung | |
|---|---|---|
![]() ![]() ![]() ![]() | IComparable.CompareTo | |
![]() ![]() ![]() ![]() | IFormattable.ToString |
using System; using System.Runtime.InteropServices; // Guid for the interface IMyInterface. [Guid("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4")] interface IMyInterface { void MyMethod(); } // Guid for the coclass MyTestClass. [Guid("936DA01F-9ABD-4d9d-80C7-02AF85C822A8")] public class MyTestClass : IMyInterface { public void MyMethod() {} public static void Main( string []args ) { GuidAttribute IMyInterfaceAttribute = (GuidAttribute) Attribute.GetCustomAttribute(typeof(IMyInterface), typeof(GuidAttribute)); System.Console.WriteLine("IMyInterface Attribute: " + IMyInterfaceAttribute.Value ); // Use the string to create a guid. Guid myGuid1 = new Guid(IMyInterfaceAttribute.Value ); // Use a byte array to create a guid. Guid myGuid2 = new Guid(myGuid1.ToByteArray()); if (myGuid1.Equals(myGuid2)) System.Console.WriteLine("myGuid1 equals myGuid2"); else System.Console.WriteLine("myGuid1 does not equal myGuid2" ); // Equality operator can also be used to determine if two guids have same value. if ( myGuid1 == myGuid2 ) System.Console.WriteLine( "myGuid1 == myGuid2" ); else System.Console.WriteLine( "myGuid1 != myGuid2" ); } } // The example displays the following output: // IMyInterface Attribute: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4 // myGuid1 equals myGuid2 // myGuid1 == myGuid2
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core-Rolle wird nicht unterstützt), Windows Server 2008 R2 (Server Core-Rolle wird mit SP1 oder höher unterstützt; Itanium wird nicht unterstützt)
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.


