Hello i Would like to know How Can i Format a Strings as a Currency in C#, or Any other Language , please thanks in advance
Hello i Would like to know How Can i Format a Strings as a Currency in C#, or Any other Language , please thanks in advance
String.Format Method (String, Object)
Replaces one or more format items in a specified string with the string representation of a specified object.
Here is C# Sharp Example
C#
public static string Format(
string format,
Object arg0
)
String.Format (String, Object) Replaces the element of formatting in a specified String with the text equivalent of the value of an instance of Object specified. it is Supported by the. NET Compact Framework.
Syntax of string.format
var s = String.format (format, args);
Use the format function to replace elements in the format specified by the textual representation of the corresponding object values. The args argument can contain a single object or an array of objects. The argument format contains zero or more fixed sequences of text mixed with one or more elements of format. Each format item corresponds to an object in objects. At runtime, each format is replaced by the string representation of the object in the list.
Bookmarks