vb.net - VB6 Format function: analog in .NET -


string format function that is specified in the form of analog for in the documentation> The format is provided for the compatibility with the VB6 function and basically has the same powers as String.Format . There is also VisualBasic namespace from the Format function.

Actually, these two formatting dates and numbers.

But the VB6 function was able to format the string:

 ? Format $ ("Hi there", "& gt;") Hi there? Format $ ("hi you", "<") Hi there? Format $ ("Hi there", "& gt ;! @@@ ... no @@@@") HI ... is not  

string.format < / Code> is not able to do this, as far as I am worried, nor is the new format I can not find any mention in the compatibility format Some parts of the VB6 functionality have been lost, it seems that the feature was removed from "silently".

Is there anything in this framework that can do this type of formatting?

Another solution is to use Microsoft VisualBasic.Compatibility.VB6 namespace, which consists of several sections and The methods that are backwards compatible with Visual Basic 6 are included. This is primarily for the upgrade tool, but it will save you the trouble of buying a migration tool or writing code. / P>

MSDN Documentation:

Parameters do not change and it basically supports the same example as your examples:

  import Do Microsoft Visual Basic Compatibility VB6 console "Lee" ("Hi") console. Signal (Support format ("Hi there", "& gt;")) Console "Line" ("hi there") console (Support.Format ("hI there", "& lt;")) console. WrightLine ("HI was not ...") console WrititeLine (Support format ("Hi there", "> no! @@@ .. @@@@ @))  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -