Monday, May 18, 2009

Replacement for VB6.Format(Number, "00") in VB 2005

When I converted the project from VB6 to VB.NET, either the Converter or someone on our team used the Microsoft.VisualBasic.Compatability library for the following code:
 VB6.Format(anumber, "00")
the replacement in .NET 2005 is:
CStr(anumber).PadLeft(2, "0")




No comments: