private static Guid generateSequentialGuid() { Guid guid; int num = UniqueIdentifier.UuidCreateSequential(out guid); if (num != 0) { throw new Win32Exception(num, string.Format("UuidCreateSequential() call failed: {0}", num)); } return(guid); }
public static Guid Sequential() { return(UniqueIdentifier.setSortOrder(UniqueIdentifier.generateSequentialGuid())); }