I'm working on translating a VB.NET application to C#.NET (and I've never worked with either before, although I do know C++). I've got most of it working, but there's one thing stumping me. There's a function in the VB that is
Private Sub timerReadCommands_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerReadCommands.Tick
But timerReadCommands
is not declared anywhere. There's no button called that, there's no variable called that, Visual Studio says this method has zero references, I even tried checking the other file to see if it was somehow declared over there.
This VB application (and method) works as expected, but it's not working in the C# version. I figure it must be declared somewhere, and I just can't find the declaration. In the C# application, I tried
Timer timerReadCommands = new Timer();
to declare it, which eliminated the undeclared variable errors, but the method never runs.
I've tried Googling to figure out how the VB is working, in order to try to mimic it in C#, but I'm only getting results from people whose timers aren't working. I need to know why mine is. Alternatively, I need to know how to make my C# one work.
Thanks!