C#中Format(iCryptedByte, "000")
(VB.NET)的等效代码是什么?
Another very useful site for C# string formatting: http://blog.stevex.net/string-formatting-in-csharp/
Instead of {0:D3}
you can also use the zero placeholder, eg {0:000}
will pad with zeros to minimum length of three.
Given this VB code:
Strings.Format(iCryptedByte, format)
Replace with this C# code:
var csformat = "{0:" + format + "}";
String.Format(csformat, iCryptedByte);
尝试:
iCryptedByte.ToString("D3");
Microsoft.VisualBasic.Strings.Format(iCryptedByte, "000");
您需要添加对Microsoft.VisualBasic程序集的引用。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.