No direct translation is possible for that single line - the VB to C#
converter Instant C# (
www.instantcsharp.com) has the
following example:
VB code with On Error ... statements:
Public Sub UnstructuredErrorHandlingExampleOne()
On Error GoTo ErrorHandler
'... <main logic>
On Error Resume Next 'this won't be converted
'... <more main logic>
'turn off error handling:
On Error GoTo 0
'... <more main logic>
Exit Sub
ErrorHandler:
'... <error handling code>
Resume 'this won't be converted
End Sub
C# code produced by Instant C#:
public void UnstructuredErrorHandlingExampleOne()
{
string ActiveErrorHandler = "";
try
{
// On Error GoTo ErrorHandler
ActiveErrorHandler = "ErrorHandler";
//... <main logic>
//INSTANT C# TODO TASK: The 'On Error Resume Next' statement is not
converted by Instant C#:
On Error Resume Next //this won't be converted
//... <more main logic>
//turn off error handling:
// On Error GoTo 0
ActiveErrorHandler = "";
//... <more main logic>
return;
}
catch
{
if (ActiveErrorHandler == "ErrorHandler")
{
//... <error handling code>
//INSTANT C# TODO TASK: The simple 'Resume' statement is not converted
by Instant C#:
Resume //this won't be converted
}
}
}
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com