Formats the value of the current instance using the specified format.
Syntax
Parameters
- format
- formatProvider
Example
Library/Library.Test/TestDbGuid.cs
C# | Copy Code |
---|
Guid test = Guid.NewGuid();
Assert.AreEqual(test.ToString(), new DbGuid(test).ToString());
Assert.AreEqual(test.ToString("N"), new DbGuid(test).ToString("N"));
Assert.AreEqual(test.ToString("B", CultureInfo.InvariantCulture), new DbGuid(test).ToString("B", CultureInfo.InvariantCulture)); |
VB.NET | Copy Code |
---|
Dim test As Guid = Guid.NewGuid()
Assert.AreEqual(test.ToString(), New DbGuid(test).ToString())
Assert.AreEqual(test.ToString("N"), New DbGuid(test).ToString("N"))
Assert.AreEqual(test.ToString("B", CultureInfo.InvariantCulture), New DbGuid(test).ToString("B", CultureInfo.InvariantCulture)) |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also