Exemplo n.º 1
0
    public _UUID()
    {
        BitArray ba = UIDHandler.Next();

        byte[] bA = new byte[ba.Count / 8];
        for (int b = 0; b < ba.Length; b += 8)
        {
            bA[b / 8] = BinaryConverter.ConvertToByte(new BitArray(new bool[]
            {
                ba[b],
                ba[b + 1],
                ba[b + 2],
                ba[b + 3],
                ba[b + 4],
                ba[b + 5],
                ba[b + 6],
                ba[b + 7],
            }));
        }
        code = Convert.ToBase64String(bA);
    }