NewId id = NewId.Next(); //produces an id like {11790000-cf25-b808-dc58-08d367322210}
// Supports operations similar to GUID
NewId id = NewId.Next().ToString("D").ToUpperInvariant();
// Produces 11790000-CF25-B808-2365-08D36732603A
// Start from an id
NewId id = new NewId("11790000-cf25-b808-dc58-08d367322210");
// Start with a byte-array
var bytes = new byte[] { 16, 23, 54, 74, 21, 14, 75, 32, 44, 41, 31, 10, 11, 12, 86, 42 };
NewId theId = new NewId(bytes);
|