By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

Using reserved keyword as method name

P: n/a
Is it possible to apply some attribute to allow the use of a reserved
keyword as a name for a class member?
eg

Class Foo
Sub Stop()
...
End Sub
End Class

I thought it might be possible because the System.Timers.Timer has a Stop
method.
--
Thanks for any help,
Shayne H

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Yes.

Class Foo
Sub [Stop]()
...
End Sub
End Class

HTH

Charles
"Shayne H" <shaynehATlycosSPAMGOTOHELLcoDOTuk> wrote in message
news:ui**************@tk2msftngp13.phx.gbl...
Is it possible to apply some attribute to allow the use of a reserved
keyword as a name for a class member?
eg

Class Foo
Sub Stop()
...
End Sub
End Class

I thought it might be possible because the System.Timers.Timer has a Stop
method.
--
Thanks for any help,
Shayne H

Nov 20 '05 #2

P: n/a
"Shayne H" <shaynehATlycosSPAMGOTOHELLcoDOTuk> scripsit:
Is it possible to apply some attribute to allow the use of a reserved
keyword as a name for a class member?

Class Foo
Sub Stop()
...
End Sub
End Class

I thought it might be possible because the System.Timers.Timer has a Stop
method.


Put the name into square brackets: 'Sub [Stop]'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.