Visual Basic (Declaration) | |
---|---|
Public Structure DbGuid Inherits System.ValueType |
C# | |
---|---|
public struct DbGuid : System.ValueType |
Bits - usage 00-03 - Reserved, always 000 if generated with DbGuid.NewGuid() 03-52 - Represent bits 3-52 of the DateTime.UtcNow.Ticks value 52-80 - 25 bits of incrementing numeric value 64-66 - Guid type constant of 111, or 001 if IsSqlGuid is true 76-128- Randomly generated bytes
Library/Library.Test/TestDbGuid.cs
C# | Copy Code |
---|---|
DbGuid testA = DbGuid.NewGuid(); TestEquality(testA, testA, true); TestEquality(testA, DbGuid.NewGuid(), false); TestEquality(testA, new DbGuid(Guid.NewGuid()), false); TestEquality(testA, testA.ToSqlGuid(), true); TestEquality(testA, testA.ToSqlGuid().ToSequenceGuid(), true); |
VB.NET | Copy Code |
---|---|
Dim testA As DbGuid = DbGuid.NewGuid() TestEquality(testA, testA, True) TestEquality(testA, DbGuid.NewGuid(), False) TestEquality(testA, New DbGuid(Guid.NewGuid()), False) TestEquality(testA, testA.ToSqlGuid(), True) TestEquality(testA, testA.ToSqlGuid().ToSequenceGuid(), True) |
System.Object
System.ValueType
CSharpTest.Net.Data.DbGuid
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
DbGuid MembersCSharpTest.Net.Data Namespace
Int32 DbGuid.DbGuidComparer.Compare(DbGuid,DbGuid)
Boolean DbGuid.DbGuidComparer.Equals(DbGuid,DbGuid)
Source Code
Library/Data/DbGuid.csUsed By
DbGuid DbGuid.ToSqlGuid()DbGuid DbGuid.ToSequenceGuid()
Boolean DbGuid.Equals(Object)
Int32 DbGuid.DbGuidComparer.GetHashCode(DbGuid)