GUIDとは? わかりやすく解説

Guid コンストラクタ (Int32, Int16, Int16, Byte[])

指定した整数バイト配列使用して、Guid クラス新しインスタンス初期化します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    a As Integer, _
    b As Short, _
    c As Short, _
    d As Byte() _
)
Dim a As Integer
Dim b As Short
Dim c As Short
Dim d As Byte()

Dim instance As New Guid(a,
 b, c, d)
public Guid (
    int a,
    short b,
    short c,
    byte[] d
)
public:
Guid (
    int a, 
    short b, 
    short c, 
    array<unsigned char>^ d
)
public Guid (
    int a, 
    short b, 
    short c, 
    byte[] d
)
public function Guid (
    a : int, 
    b : short, 
    c : short, 
    d : byte[]
)

パラメータ

a

GUID の最初の 4 バイト

b

GUID の次の 2 バイト

c

GUID の次の 2 バイト

d

GUID の残りの 8 バイト

例外例外
例外種類条件

ArgumentNullException

dnull 参照 (Visual Basic では Nothing) です。

ArgumentException

d長さが 8 バイトではありません。

使用例使用例

Guid(1,2,3,new byte[]{0,1,2,3,4,5,6,7})指定すると、"00000001-0002-0003-0001-020304050607" に相当する Guid作成されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Guid コンストラクタ (Byte[])

指定したバイト配列使用して、Guid クラス新しインスタンス初期化します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

public Guid (
    byte[] b
)
public:
Guid (
    array<unsigned char>^ b
)
public Guid (
    byte[] b
)
public function Guid (
    b : byte[]
)

パラメータ

b

GUID を初期化するために使用する値を格納している、16 要素バイト配列

例外例外
例外種類条件

ArgumentNullException

bnull 参照 (Visual Basic では Nothing) です。

ArgumentException

b長さ16 バイトではありません。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Guid コンストラクタ (String)

指定した文字列表される値を使用して、Guid クラス新しインスタンス初期化します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

public Guid (
    string g
)
public:
Guid (
    String^ g
)
public Guid (
    String g
)

パラメータ

g

次のいずれか形式の GUID を保持する String ('d' は大文字と小文字区別しない 16 進数文字を表す)。

連続する 32 :

dddddddddddddddddddddddddddddddd

または

間をハイフン (-)区切った 8 4 桁4 桁4 桁12 グループ左右対応している中かっこ丸かっこで GUID 全体を囲むこともできます

dddddddd-dddd-dddd-dddd-dddddddddddd

または

{dddddddd-dddd-dddd-dddd-dddddddddddd}

または

(dddddddd-dddd-dddd-dddd-dddddddddddd)

または

8 4 桁4 桁グループと、2 グループ 8 個で構成されるサブセット各グループは "0x" または "0X" で始まりコンマ区切ります。GUID 全体およびサブセットは、左右対応している中かっこ囲みます

{0xdddddddd, 0xdddd, 0xdddd,{0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd}}

中かっこコンマプリフィックスの "0x" はすべて必須です。埋め込まれている空白はすべて無視されます。グループ先頭にある 0 はすべて無視されます。

各グループ桁数は、そのグループ指定できる最大有効桁数です。1 から、例で示した各グループ桁の数までを指定できます指定した数字は、そのグループ下位と見なされます

例外例外
例外種類条件

ArgumentNullException

gnull 参照 (Visual Basic では Nothing) です。

FormatException

g形式無効です。

OverflowException

g形式無効です。

解説解説

g パラメータ16 進数アルファベット文字は、大文字でも小文字でもかまいません

たとえば、次の文字列は同じ GUID を表します

"ca761232ed4211cebacd00aa0057b223"

"CA761232-ED42-11CE-BACD-00AA0057B223"

"{CA761232-ED42-11CE-BACD-00AA0057B223}"

"(CA761232-ED42-11CE-BACD-00AA0057B223)"

"{0xCA761232, 0xED42, 0x11CE, {0xBA, 0xCD, 0x00, 0xAA, 0x00, 0x57, 0xB2, 0x23}}"

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Guid コンストラクタ (UInt32, UInt16, UInt16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)

指定した符号なし整数およびバイト使用して、Guid クラス新しインスタンス初期化します。

このコンストラクタは、CLS準拠していません。  

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<CLSCompliantAttribute(False)> _
Public Sub New ( _
    a As UInteger, _
    b As UShort, _
    c As UShort, _
    d As Byte, _
    e As Byte, _
    f As Byte, _
    g As Byte, _
    h As Byte, _
    i As Byte, _
    j As Byte, _
    k As Byte _
)
Dim a As UInteger
Dim b As UShort
Dim c As UShort
Dim d As Byte
Dim e As Byte
Dim f As Byte
Dim g As Byte
Dim h As Byte
Dim i As Byte
Dim j As Byte
Dim k As Byte

Dim instance As New Guid(a,
 b, c, d, e, f, g, h, i, j, k)
[CLSCompliantAttribute(false)] 
public Guid (
    uint a,
    ushort b,
    ushort c,
    byte d,
    byte e,
    byte f,
    byte g,
    byte h,
    byte i,
    byte j,
    byte k
)
[CLSCompliantAttribute(false)] 
public:
Guid (
    unsigned int a, 
    unsigned short b, 
    unsigned short c, 
    unsigned char d, 
    unsigned char e, 
    unsigned char f, 
    unsigned char g, 
    unsigned char h, 
    unsigned char i, 
    unsigned char j, 
    unsigned char k
)
/** @attribute CLSCompliantAttribute(false) */ 
public Guid (
    UInt32 a, 
    UInt16 b, 
    UInt16 c, 
    byte d, 
    byte e, 
    byte f, 
    byte g, 
    byte h, 
    byte i, 
    byte j, 
    byte k
)
CLSCompliantAttribute(false) 
public function Guid (
    a : uint, 
    b : ushort, 
    c : ushort, 
    d : byte, 
    e : byte, 
    f : byte, 
    g : byte, 
    h : byte, 
    i : byte, 
    j : byte, 
    k : byte
)

パラメータ

a

GUID の最初の 4 バイト

b

GUID の次の 2 バイト

c

GUID の次の 2 バイト

d

GUID の次のバイト

e

GUID の次のバイト

f

GUID の次のバイト

g

GUID の次のバイト

h

GUID の次のバイト

i

GUID の次のバイト

j

GUID の次のバイト

k

GUID の次のバイト

解説解説

この方法でバイト指定した場合エンディアンについて考慮する必要がありません。

使用例使用例

Guid(0xa,0xb,0xc,0,1,2,3,4,5,6,7) と指定すると、"0000000a-000b-000c-0001-020304050607" に相当する Guid作成されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Guid コンストラクタ (Int32, Int16, Int16, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)

指定した整数およびバイト使用して、Guid の新しインスタンス初期化します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    a As Integer, _
    b As Short, _
    c As Short, _
    d As Byte, _
    e As Byte, _
    f As Byte, _
    g As Byte, _
    h As Byte, _
    i As Byte, _
    j As Byte, _
    k As Byte _
)
Dim a As Integer
Dim b As Short
Dim c As Short
Dim d As Byte
Dim e As Byte
Dim f As Byte
Dim g As Byte
Dim h As Byte
Dim i As Byte
Dim j As Byte
Dim k As Byte

Dim instance As New Guid(a,
 b, c, d, e, f, g, h, i, j, k)
public Guid (
    int a,
    short b,
    short c,
    byte d,
    byte e,
    byte f,
    byte g,
    byte h,
    byte i,
    byte j,
    byte k
)
public:
Guid (
    int a, 
    short b, 
    short c, 
    unsigned char d, 
    unsigned char e, 
    unsigned char f, 
    unsigned char g, 
    unsigned char h, 
    unsigned char i, 
    unsigned char j, 
    unsigned char k
)
public Guid (
    int a, 
    short b, 
    short c, 
    byte d, 
    byte e, 
    byte f, 
    byte g, 
    byte h, 
    byte i, 
    byte j, 
    byte k
)
public function Guid (
    a : int, 
    b : short, 
    c : short, 
    d : byte, 
    e : byte, 
    f : byte, 
    g : byte, 
    h : byte, 
    i : byte, 
    j : byte, 
    k : byte
)

パラメータ

a

GUID の最初の 4 バイト

b

GUID の次の 2 バイト

c

GUID の次の 2 バイト

d

GUID の次のバイト

e

GUID の次のバイト

f

GUID の次のバイト

g

GUID の次のバイト

h

GUID の次のバイト

i

GUID の次のバイト

j

GUID の次のバイト

k

GUID の次のバイト

解説解説
使用例使用例

Guid(0xa,0xb,0xc,0,1,2,3,4,5,6,7)指定すると、"0000000a-000b-000c-0001-020304050607" に相当する Guid作成されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Guid コンストラクタ


Guid フィールド


パブリック フィールドパブリック フィールド

  名前 説明
パブリック フィールド Empty 値がすべて 0 であることが保証されている Guid クラス読み取り専用インスタンス
参照参照

関連項目

Guid 構造体
System 名前空間

Guid メソッド


Guid メンバ

グローバル一意識別子 (GUID) を表します

Guid データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック フィールドパブリック フィールド
  名前 説明
パブリック フィールド Empty 値がすべて 0 であることが保証されている Guid クラス読み取り専用インスタンス
パブリック メソッドパブリック メソッド
参照参照

関連項目

Guid 構造体
System 名前空間

Guid 構造体

グローバル一意識別子 (GUID) を表します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Structure Guid
    Implements IFormattable, IComparable, IComparable(Of
 Guid), _
    IEquatable(Of Guid)
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public struct Guid : IFormattable, IComparable, IComparable<Guid>,
 
    IEquatable<Guid>
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public value class Guid : IFormattable, IComparable,
 IComparable<Guid>, 
    IEquatable<Guid>
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class Guid extends ValueType implements
 IFormattable, IComparable, 
    IComparable<Guid>, IEquatable<Guid>
JScript では、構造体使用できますが、新規に宣言することはできません。
解説解説
使用例使用例

ユーザー定義のクラスインターフェイス属性として Guid オブジェクト関連付け読み取りを行う方法については、次のコード例参照してください

Imports System
Imports System.Runtime.InteropServices

' Guid for the interface IMyInterface.
<Guid("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4")>
 _
Interface IMyInterface
    Sub MyMethod()
End Interface

' Guid for the coclass MyTestClass.
<Guid("936DA01F-9ABD-4d9d-80C7-02AF85C822A8")>
 _
Public Class MyTestClass
    Implements IMyInterface
    
    ' Run regasm on this assembly to create .reg and .tlb files.
    ' Reg file can be used to register this coclass in the registry.
    ' Tlb file will be used to do interop.
    Public Sub MyMethod() Implements
 IMyInterface.MyMethod
    End Sub
    
    Public Shared Sub Main()
        ' Example addresses the following in System.Runtime.InterOpServices.GuidAttribute.
        ' How to specify the attribute on interface/coclass.
        ' Retrieve the GuidAttribute from an interface/coclass.
        ' Value property on GuidAttribute class.
        ' Example addresses the following in System.Guid.
        ' Constructor Guid(string).
        ' Constructor Guid(ByteArray).
        ' Equals.
        ' Operator ==.
        ' CompareTo.
        Dim IMyInterfaceAttribute As Attribute
 = Attribute.GetCustomAttribute(GetType(IMyInterface), GetType(GuidAttribute))
        
        ' The Value property of GuidAttribute returns a string. 
        System.Console.WriteLine("IMyInterface Attribute: "
 + CType(IMyInterfaceAttribute, GuidAttribute).Value)
        
        ' Using the string to create a guid.
        Dim myGuid1 As New
 Guid(CType(IMyInterfaceAttribute, GuidAttribute).Value)
        ' Using a byte array to create a guid.
        Dim myGuid2 As New
 Guid(myGuid1.ToByteArray())
        
        ' Equals is overridden and so value comparison is done though
 references are different.
        If myGuid1.Equals(myGuid2) Then
            System.Console.WriteLine("myGuid1 equals myGuid2")
        Else
            System.Console.WriteLine("myGuid1 not equals myGuid2")
        End If 
        ' Equality operator can also be used to determine if two guids
 have same value.
        If myGuid1.ToString() = myGuid2.ToString() Then
            System.Console.WriteLine("myGuid1 == myGuid2")
        Else
            System.Console.WriteLine("myGuid1 != myGuid2")
        End If
        ' CompareTo returns 0 if the guids have same value.
        If myGuid1.CompareTo(myGuid2) = 0 Then
            System.Console.WriteLine("myGuid1 compares to myGuid2")
        Else
            System.Console.WriteLine("myGuid1 does not compare
 to myGuid2")
        End If 
        
        System.Console.ReadLine()

        'Output:
        'IMyInterface Attribute: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4
        'myGuid1 equals myGuid2
        'myGuid1 == myGuid2
        'myGuid1 compares to myGuid2
    End Sub
End Class
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
{
    // Run regasm on this assembly to create .reg and .tlb files.
    // Reg file can be used to register this coclass in the registry.
    // Tlb file will be used to do interop.

    public void MyMethod() {}

    public static void Main(
 string []args )
    {
        // Example addresses the following in System.Runtime.InterOpServices.GuidAttribute.
        // How to specify the attribute on interface/coclass.
        // Retrieve the GuidAttribute from an interface/coclass.
        // Value property on GuidAttribute class.

        // Example addresses the following in System.Guid.
        // Constructor Guid(string).
        // Constructor Guid(ByteArray).
        // Equals.
        // Operator ==.
        // CompareTo.

        Attribute IMyInterfaceAttribute = Attribute.GetCustomAttribute( typeof( IMyInterface
 ), typeof( GuidAttribute ) );
        
        // The Value property of GuidAttribute returns a string. 
        System.Console.WriteLine( "IMyInterface Attribute: " + ((GuidAttribute)IMyInterfaceAttribute).Value
 );    

        // Using the string to create a guid.
        Guid myGuid1 = new Guid( ((GuidAttribute)IMyInterfaceAttribute).Value
 );
        // Using a byte array to create a guid.
        Guid myGuid2 = new Guid ( myGuid1.ToByteArray() );

        // Equals is overridden and so value comparison is done though
 references are different.
        if ( myGuid1.Equals( myGuid2 ) )
            System.Console.WriteLine( "myGuid1 equals myGuid2" );
        else
            System.Console.WriteLine( "myGuid1 not equals 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" );
    
        // CompareTo returns 0 if the guids have same value.
        if ( myGuid1.CompareTo( myGuid2 ) == 0 )
            System.Console.WriteLine( "myGuid1 compares to myGuid2" );
        else
            System.Console.WriteLine( "myGuid1 does not compare to myGuid2"
 );

        System.Console.ReadLine();

        //Output.
        //IMyInterface Attribute: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4
        //myGuid1 equals myGuid2
        //myGuid1 == myGuid2
        //myGuid1 compares to myGuid2
    }
}
using namespace System;
using namespace System::Runtime::InteropServices;

// Guid for the interface IMyInterface.

[Guid("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4")]
public interface class IMyInterface
{
public:
   void MyMethod();
};


// Guid for the coclass MyTestClass.

[Guid("936DA01F-9ABD-4d9d-80C7-02AF85C822A8")]
public ref class MyTestClass: public
 IMyInterface
{
public:

   // Run regasm on this assembly to create .reg and .tlb files.
   // Reg file can be used to register this coclass in the registry.
   // Tlb file will be used to do interop.
   virtual void MyMethod(){}
};

int main()
{
   // Example addresses the following in System.Runtime.InterOpServices.GuidAttribute.
   // How to specify the attribute on interface/coclass.
   // Retrieve the GuidAttribute from an interface/coclass.
   // Value property on GuidAttribute class.
   // Example addresses the following in System.Guid.
   // Constructor Guid(string).
   // Constructor Guid(ByteArray).
   // Equals.
   // Operator ==.
   // CompareTo.
   Attribute^ IMyInterfaceAttribute = Attribute::GetCustomAttribute( IMyInterface::typeid,
 GuidAttribute::typeid );

   // The Value property of GuidAttribute returns a string. 
   System::Console::WriteLine( String::Concat(  "IMyInterface Attribute: ",
 (dynamic_cast<GuidAttribute^>(IMyInterfaceAttribute))->Value ) );

   // Using the string to create a guid.
   Guid myGuid1 = Guid(dynamic_cast<GuidAttribute^>(IMyInterfaceAttribute)->Value);

   // Using a byte array to create a guid.
   Guid myGuid2 = Guid(myGuid1.ToByteArray());

   // Equals is overridden and so value comparison is done though references
 are different.
   if ( myGuid1.Equals( myGuid2 ) )
      System::Console::WriteLine(  "myGuid1 equals myGuid2" );
   else
      System::Console::WriteLine(  "myGuid1 not equals 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" );

   // CompareTo returns 0 if the guids have same value.
   if ( myGuid1.CompareTo( myGuid2 ) == 0 )
      System::Console::WriteLine(  "myGuid1 compares to myGuid2" );
   else
      System::Console::WriteLine(  "myGuid1 does not compare to myGuid2"
 );

   //Output.
   //IMyInterface Attribute: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4
   //myGuid1 equals myGuid2
   //myGuid1 == myGuid2
   //myGuid1 compares to myGuid2
}
import System.*;
import System.Runtime.InteropServices.*;

// Guid for the interface IMyInterface.
/** @attribute Guid("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4")
 */
interface IMyInterface
{
    void MyMethod();
} //IMyInterface

// Guid for the coclass MyTestClass.
/** @attribute Guid("936DA01F-9ABD-4d9d-80C7-02AF85C822A8")
 */
public class MyTestClass implements IMyInterface
{
    // Run regasm on this assembly to create .reg and .tlb files.
    // Reg file can be used to register this coclass in the registry.
    // Tlb file will be used to do interop.
    public void MyMethod()
    {
    } //MyMethod

    public static void main(String[]
 args)
    {
        // Example addresses the following in System.Runtime.
        // InterOpServices.GuidAttribute.
        // How to specify the attribute on interface/coclass.
        // Retrieve the GuidAttribute from an interface/coclass.
        // Value property on GuidAttribute class.
        // Example addresses the following in System.Guid.
        // Constructor Guid(string).
        // Constructor Guid(ByteArray).
        // Equals.
        // Operator ==.
        // CompareTo.
        Attribute iMyInterfaceAttribute = 
                  Attribute.GetCustomAttribute(IMyInterface.class.ToType(),
 
                  GuidAttribute.class.ToType());

        // The Value property of GuidAttribute returns a string. 
        System.Console.WriteLine("IMyInterface Attribute: " 
            + ((GuidAttribute)(iMyInterfaceAttribute)).get_Value());

        // Using the string to create a guid.
        Guid myGuid1 = 
             new Guid(((GuidAttribute)(iMyInterfaceAttribute)).get_Value());
        // Using a byte array to create a guid.
        Guid myGuid2 = new Guid(myGuid1.ToByteArray());
        // Equals is overridden and so value comparison is done though
 
        // references are different.
        if (myGuid1.Equals(myGuid2)) {
            System.Console.WriteLine("myGuid1 equals myGuid2");
        }
        else {
            System.Console.WriteLine("myGuid1 not equals 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");
        }
        // CompareTo returns 0 if the guids have same value.
        if (myGuid1.CompareTo(myGuid2) == 0) {
            System.Console.WriteLine("myGuid1 compares to myGuid2");
        }
        else {
            System.Console.WriteLine("myGuid1 does not compare to myGuid2");
        }
        System.Console.ReadLine();
    } //main 
} //MyTestClass 

//Output.
//IMyInterface Attribute: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4
//myGuid1 equals myGuid2
//myGuid1 == myGuid2
//myGuid1 compares to myGuid2
import System;
import System.Runtime.InteropServices;

// Guid for the interface IMyInterface.
Guid("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4") interface IMyInterface
{
    function MyMethod();
}

// Guid for the coclass MyTestClass.
public Guid("936DA01F-9ABD-4d9d-80C7-02AF85C822A8")
 class MyTestClass implements IMyInterface
{
    // Run regasm on this assembly to create .reg and .tlb files.
    // Reg file can be used to register this coclass in the registry.
    // Tlb file will be used to do interop.

    public function MyMethod() {}

    public static function
 Main()
    {
        // Example addresses the following in System.Runtime.InterOpServices.GuidAttribute.
        // How to specify the attribute on interface/coclass.
        // Retrieve the GuidAttribute from an interface/coclass.
        // Value property on GuidAttribute class.

        // Example addresses the following in System.Guid.
        // Constructor Guid(string).
        // Constructor Guid(ByteArray).
        // Equals.
        // Operator ==.
        // CompareTo.

        var IMyInterfaceAttribute : Attribute = Attribute.GetCustomAttribute(Type.GetType("IMyInterface"),
 GuidAttribute);
        
        // The Value property of GuidAttribute returns a string. 
        System.Console.WriteLine( "IMyInterface Attribute: " + (GuidAttribute(IMyInterfaceAttribute)).Value
 );    

        // Using the string to create a guid.
        var myGuid1 : Guid = new Guid( (GuidAttribute(IMyInterfaceAttribute)).Value
 );
        // Using a byte array to create a guid.
        var myGuid2 : Guid = new Guid ( myGuid1.ToByteArray()
 );

        // Equals is overridden and so value comparison is done though
 references are different.
        if ( myGuid1.Equals( myGuid2 ) )
            System.Console.WriteLine( "myGuid1 equals myGuid2" );
        else
            System.Console.WriteLine( "myGuid1 not equals 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" );
    
        // CompareTo returns 0 if the guids have same value.
        if ( myGuid1.CompareTo( myGuid2 ) == 0 )
            System.Console.WriteLine( "myGuid1 compares to myGuid2" );
        else
            System.Console.WriteLine( "myGuid1 does not compare to myGuid2"
 );

        System.Console.ReadLine();

        //Output.
        //IMyInterface Attribute: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4
        //myGuid1 equals myGuid2
        //myGuid1 == myGuid2
        //myGuid1 compares to myGuid2
    }
}

MyTestClass.Main();

スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からGUIDを検索した結果を表示しています。
Weblioに収録されているすべての辞書からGUIDを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からGUIDを検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「GUID」の関連用語

GUIDのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



GUIDのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS