I used the Artinsoft VB6 for .NET wizard to convert a VB6 application to C #, and I get an update warning anywhere I used Err.Number before;
// UPGRADE_WARNING: (2081) Err.Number has a new behavior.
The converted code refers to:
Microsoft.VisualBasic.Information.Err().Number
I’m not lucky to know what the difference is. Does anyone know what this might be, or is it possible to ignore this warning?
UPDATE
For those who stumble upon this question in the future - a word of warning; It is not recommended that you continue to use Err.Number in a C # .NET application. The property is still available, but it does not populate after errors as expected. The only time it is populated is expected to be an error that occurs from the COM component.
Normal errors, for example. DB access, I / O, etc. Will not assign the value Err (). Number, and therefore its use should be reorganized, unfortunately.
Oddly enough, in VB.NET it still works as expected, so maybe you need to keep this in mind when deciding on the target language to convert.
source
share