Can I use "Stop" as subroutine name in VB?
Posted
by Kratz
on Stack Overflow
See other posts from Stack Overflow
or by Kratz
Published on 2010-06-08T13:54:26Z
Indexed on
2010/06/08
14:02 UTC
Read the original article
Hit count: 159
vb6
I'd like to create an object... say a "Movie" object. The object should have a method name "Stop", so I can have this code below
dim Mov as new Movie
Mov.Stop ' To execute the Stop method.
In my Movie class, I should have something like this.
Sub Stop()
'code here needed for the Stop subroutine
End Sub
However, I can't use "Stop" as name as this is a reserved word. I see a VB code that has "Stop" as one of the method. Unfortunately, the code is protected so I can't view it.
How can I name a subroutine as "Stop"?
© Stack Overflow or respective owner