I inherited an old VB.NET program that was written long before I got to this job. I'm having to rewrite it in C#. I have been unable to find anything that seems to be a conversion for this. Can someone show me a translation for this in C#, please?
Private Sub Log(Message As String)
Try
If txtLog.InvokeRequired Then
txtLog.Invoke(Sub()
Log(Message)
End Sub)
Else
txtLog.AppendText(Message & Environment.NewLine)
End If
Catch ex As Exception
End Try
End Sub