Dim dblValue As Double = 15.2564 Dim fmt As String = "000.####" Console.WriteLine(dblValue.ToString(fmt))
decimal decNum = 0.5656M; var strArr = decNum.ToString().Split('.').ToArray(); string finalString = strArr[0].PadLeft(3, '0') + strArr[1];
Split
ToArray
Length
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)