What is the equivalent when you put in VB like this
VB Code:
Private Sub Hi() PartOne: 'code PartTwo: Goto PartOne End Sub
Is there an equivalent to that in C#?
Printable View
What is the equivalent when you put in VB like this
VB Code:
Private Sub Hi() PartOne: 'code PartTwo: Goto PartOne End Sub
Is there an equivalent to that in C#?
GOTO STATEMENTS ARE EVIL, DON'T USE THEM!
That being said, look:
A Sub is a function that doesn't return anything, so you'd use
As for the rest of it, GOTOs shouldn't be used. If you need to return to another spot, use loops or maybe a function.Code:private void Hi()
{
//Code Here
}
Or rarely , you have to use Recursion that loops inside the method itself but it depends on the functionality you're implementing .
oh well, thanks anyway. I am fed up with VB anyhow.