CSharpTest.Net
ToSequenceGuid Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Data Namespace > DbGuid Structure : ToSequenceGuid Method

Glossary Item Box

Used to reverse the effects of ToSqlGuid() and obtain a guid who's ToByteArray result is sequential. If IsSqlGuid is already False this call has no effect and returns the same value.

Syntax

Visual Basic (Declaration) 
Public Function ToSequenceGuid() As DbGuid
C# 
public DbGuid ToSequenceGuid()

Example

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.NETCopy 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)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys