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(
	string formatString
)
Visual Basic
Public Sub New ( 
	formatString As String
)
Visual C++
public:
StringFormat(
	String^ formatString
)
F#
new : 
        formatString : string -> StringFormat

Parameters

formatString
Type: System..::..String
The string format, passed to the Format(String, array<Object>[]()[][]) method. See MSDN library for more details.

Examples

 Copy imageCopy
public void StringFormat()
{
    IFormat format = new StringFormat("yyyy-MM-dd");

    UnboundValueAccessor accessor = new UnboundValueAccessor();

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

//Console output:
2009-10-02

See Also