Enables use of standard string patterns to format values in cells.
Namespace: Dapfor.Net.FormatsAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
| C# |
|---|
public class FormatAttribute : FormatBaseAttribute |
| Visual Basic |
|---|
Public Class FormatAttribute Inherits FormatBaseAttribute |
| Visual C++ |
|---|
public ref class FormatAttribute : public FormatBaseAttribute |
| F# |
|---|
type FormatAttribute = class inherit FormatBaseAttribute end |
Remarks
Some formats greatly simplify application development. For example, StringFormat enables use of standard patterns for formatting values through String.Format():
column.Format = new StringFormat("### ### ### ###", string.Empty, " $"); The value 12345 is displayed as "12 345 $" | |
The following example demonstrates how to declare string pattern for a class property:
public class Product { private DateTime maturity; [Format("yyyy-MM-dd")] public DateTime Maturity { get { return maturity; } } } | |
Inheritance Hierarchy
System..::..Object
System..::..Attribute
Dapfor.Net.Formats..::..FormatBaseAttribute
Dapfor.Net.Formats..::..FormatAttribute
System..::..Attribute
Dapfor.Net.Formats..::..FormatBaseAttribute
Dapfor.Net.Formats..::..FormatAttribute