Compare 2 Guid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ucasesoftware

    #1

    Compare 2 Guid

    if guid1 = guid2 then

    Doesn't work ! ???

    How to compare them ?

  • m.posseth

    #2
    Re: Compare 2 Guid

    Hello it works like this
    Dim a As Guid = Guid.NewGuid

    Dim b As Guid = a

    'Dim b As Guid = Guid.NewGuid

    If a.Equals(b) Then

    MsgBox("they are the same ")

    Else

    MsgBox("they are not the same ")

    End If

    or you could first use the tostring method and then compare them


    regards

    Michel Posseth [MCP]

    "ucasesoftw are" <ucasesoftware@ hotmail.fr> wrote in message
    news:1126288787 .916208.89520@o 13g2000cwo.goog legroups.com...[color=blue]
    > if guid1 = guid2 then
    >
    > Doesn't work ! ???
    >
    > How to compare them ?
    >[/color]


    Comment

    • Siva M

      #3
      Re: Compare 2 Guid

      You can indirectly do it by Guid.op_Equalit y (guid1, guid2). Or use
      Guid.Equals() method.

      "ucasesoftw are" <ucasesoftware@ hotmail.fr> wrote in message
      news:1126288787 .916208.89520@o 13g2000cwo.goog legroups.com...
      if guid1 = guid2 then

      Doesn't work ! ???

      How to compare them ?


      Comment

      Working...