CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Location
    Ballymena
    Posts
    57

    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

  2. #2
    Join Date
    Feb 2002
    Location
    Spain
    Posts
    148
    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

  3. #3
    Join Date
    May 2002
    Location
    Ballymena
    Posts
    57
    Hi Victor,

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

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured