I've used Artinsoft's VB6 to .NET wizard to convert a VB6 application to C# and I'm getting an upgrade warning in any place where Err.Number was previously used;
//UPGRADE_WARNING: (2081) Err.Number has a new behavior.
The converted code is referring to;
Microsoft.VisualBasic.Information.Err().Number
I haven't had any luck finding out what the difference is. Does anyone know what it might be, or is it safe to ignore this warning?
UPDATE
For anyone who stumbles across this question in the future - a word of warning; It is NOT safe to continue using Err.Number in a C# .NET application. The property is still available, however it is not populated after errors as expected. The only case in which it is populated as expected is if the error comes from a COM component.
Normal errors e.g. DB access, IO operations etc. will not give any value to Err().Number, and so its use must be refactored unfortunately.
Strangely enough, in VB .NET, it still does work as expected, so perhaps this is something to keep in mind when making a decision on the target language for conversion.