-
Using Guid in c#
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
-
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
-
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