Never Nop Tech

Never Nop Tech

創造意義,動手去做。

[VB.NET]自動補0教學

在此我提供常用的方法

Padleft

範例:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = TextBox1.Text.PadLeft(4, “0″)
End Sub
End Class