Namespace: Dapfor.Net.FormatsAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
C# |
---|
public StringFormat(
string formatString,
IFormatProvider formatProvider
) |
Visual Basic |
---|
Public Sub New (
formatString As String,
formatProvider As IFormatProvider
) |
Visual C++ |
---|
public:
StringFormat(
String^ formatString,
IFormatProvider^ formatProvider
) |
F# |
---|
new :
formatString : string *
formatProvider : IFormatProvider -> StringFormat |
Parameters
- formatString
- Type: System..::..String
The string format, passed to the Format(String, array<Object>[]()[][]) method. See MSDN library for more details.
- formatProvider
- Type: System..::..IFormatProvider
The formatString provider.
Examples
| Copy |
---|
public void StringFormat()
{
IFormat format = new StringFormat("yyyy-MM-dd", CultureInfo.InvariantCulture);
UnboundValueAccessor accessor = new UnboundValueAccessor();
accessor["Date"].Value = new DateTime(2009, 10, 02);
Console.WriteLine(format.Format(accessor["Date"]));
}
2009-10-02 |
See Also