CSharpTest.Net
ToString(String,IFormatProvider) Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Data Namespace > DbGuid Structure > ToString Method : ToString(String,IFormatProvider) Method

format
formatProvider

Glossary Item Box

Formats the value of the current instance using the specified format.

Syntax

Visual Basic (Declaration) 
Public Overloads Function ToString( _
   ByVal format As String, _
   ByVal formatProvider As IFormatProvider _
) As String
C# 
public string ToString( 
   string format,
   IFormatProvider formatProvider
)

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

Generated with Document! X 2011 by Innovasys