Click to See Complete Forum and Search --> : Using Guid in c#


JennyM
July 1st, 2002, 09:22 AM
Hi Guys,

I am converting some code from C++, which was using UUID to create an ID number. It had the 4 attributes of Data1, Data2, Data3 and Data4.
In c# there doesnt appear to be any UUID (or at least not that I can find being relatively new to C# programming) and I am using Guid, but, the attributes are not available and these are what I need.

Would any one have an idea of how to populate the GUid number without using UUID?

Thanks,
Jenny

V. Lorenzo
July 2nd, 2002, 12:13 PM
Hi:

You have to do that in the "constructor" of the System.Guid. After constructed, you may use the ToString() and ToByteArray() methods. Not too much for what we usually need.......

VictorL

JennyM
July 3rd, 2002, 03:16 AM
Hi Victor,

Thanks for the reply, but, it wasnt quite what I needed. I probably didnt explain myself too well :o)

I got a bit confused from the UUID->data1, UUID->data2, etc as to how they were represented in Guid, but I sorted it out that I needed to use a byte array for data4 and so on.

Thanks again!

Jenny