At my day job, I've been working to update an old quickbasic-centered data storage system to something a little more 21st century. Along the way, of course, I've had to learn a great deal about QuickBasic and how it stores/retrieves values in text files.
Our data solution uses fixed-length text records for storage. One 'quirk' about that is that it also uses QuickBasic's CVI() and MKS() functions to store 16-bit Integers in a 2-character string (so any integer will still fit into our happy little fixed-length string).
The problem is that Microsoft's .NET doesn't have any functions that resemble CVI(), MKS(), or a number of others that were found in QB (like MKD, CVD, MKI, MKL, CVL). There are plenty of examples out there for VB6, but not .NET!
Anyway, I've searched pretty hard for a .NET version of CVI(), and finally found one that would work:
Here's the link to the original article, and I'll attach the code for download in case that article goes away some time in the future:
I hope this helps someone else with the same problem.
CV and MK Functions.txt (4.85 KB)