Click or drag to resize

FormatStringExtensionsFormatString Method

Converts the object to string based on the format specified.

Namespace:  Aloe.SystemFrameworks.Domain
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public static string FormatString(
	this DomainObject obj,
	string format,
	IFormatProvider formatProvider = null
)

Parameters

obj
Type: Aloe.SystemFrameworks.DomainDomainObject
An object.
format
Type: SystemString
a format.
formatProvider (Optional)
Type: SystemIFormatProvider
The format provider.

Return Value

Type: String
The replaced string.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DomainObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The FormatString method supports: 1. Attributes: {DocumentDate}. 2. References: {Customer}. 3. Reference path: {Customer.Party.PartyName:C}. ChildCollections are not supported. The attribute values can be formatted with standard .Net format specifiers: {DocumentDate:yyyyMMdd}. Also the format specifiers for objects like MultilanguageString, Quantity, Amount etc. are supported.
See Also