Public Class Tester
Public Shared Sub Main
Dim intValue As Integer = 1234567
Dim floatValue As Double = Math.PI
Dim result As New System.Text.StringBuilder
result.AppendLine(String.Format("{0} ... {1}", _
intValue, floatValue))
result.AppendLine(String.Format("{0:N} ... {1:E}", _
intValue, floatValue))
result.AppendLine(intValue.ToString("N5") & " ... " & _
floatValue.ToString("G5"))
Console.WriteLine(result.ToString())
End Sub
End Class
|