Compare 2 Guid

  • Thread starter Thread starter ucasesoftware
  • Start date Start date
U

ucasesoftware

if guid1 = guid2 then

Doesn't work ! ???

How to compare them ?
 
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]
 
You can indirectly do it by Guid.op_Equality (guid1, guid2). Or use
Guid.Equals() method.

if guid1 = guid2 then

Doesn't work ! ???

How to compare them ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top