Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strNumFormat As String
Dim intSumDec As Integer = 1
Dim dblAmt As Decimal = 101.87
strNumFormat = "{0:#,##0." & New String("0", intSumDec) & "}"
'String.Format(strNumFormat, dblAmt)
Label1.Text = String.Format(strNumFormat, dblAmt)
End Sub
沒有留言:
張貼留言