C# Convert ToString(Decimal)
Description
Convert ToString(Decimal)
converts the value of the
specified decimal number to its equivalent string representation.
Syntax
Convert.ToString(Decimal)
has the following syntax.
public static string ToString(
decimal value
)
Parameters
Convert.ToString(Decimal)
has the following parameters.
value
- The decimal number to convert.
Returns
Convert.ToString(Decimal)
method returns The string representation of value.
Example
//from w w w . j a v a2s . com
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToString(123.123M));
}
}
The code above generates the following result.