Initializes a new instance of the StringFormat class.

Namespace: Dapfor.Net.Formats
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)

Syntax

C#
public StringFormat(
	IFormatProvider formatProvider
)
Visual Basic
Public Sub New ( 
	formatProvider As IFormatProvider
)
Visual C++
public:
StringFormat(
	IFormatProvider^ formatProvider
)
F#
new : 
        formatProvider : IFormatProvider -> StringFormat

Parameters

formatProvider
Type: System..::..IFormatProvider
The format provider.

Examples

 Copy imageCopy
public void StringFormat()
{
    IFormat format = new StringFormat(CultureInfo.InvariantCulture);

    UnboundValueAccessor accessor = new UnboundValueAccessor();

    accessor["Date"].Value = new DateTime(2009, 10, 02);
    Console.WriteLine(format.Format(accessor["Date"]));
}

//Console output:
10/02/2009 00:00:00

See Also