开发者

VB.NET declaration

开发者 https://www.devze.com 2023-01-23 02:34 出处:网络
I have to declare n = 01. But whenever I t开发者_如何学Gory it\'s getting changed to 1. What should I try?If this is just for display purposes then I would use the .ToString(\"0#\"), unless you real

I have to declare n = 01. But whenever I t开发者_如何学Gory it's getting changed to 1.

What should I try?


If this is just for display purposes then I would use the .ToString("0#"), unless you really need to do calculations based on two significant figures.

For index As Integer = 1 To 100
  Console.WriteLine(index.ToString("0#"))
Next

Gives you 01 02 . . 100

0

精彩评论

暂无评论...
验证码 换一张
取 消