Keyword "Select" in a user control

S

Shane

I'm creating a user control that has a textbox along with a couple of
other controls in it.

I'm mapping most of the textbox methods and properties to my control
using the textbox names. I'm having a problem with the "Select"
method. "Select" is a Visual Basic keyword, so the IDE will not let me
create that method. I'm currently using "Selects" instead, but I like
consistancy.

Anybody know a work around?

Thanks

Public Overloads Sub Selects()
tb.Select()
End Sub

Public Overloads Sub Selects(ByVal Start As Integer, ByVal Length
As Integer)
tb.Select(Start, Length)
End Sub
 
A

Armin Zingler

Shane said:
I'm creating a user control that has a textbox along with a couple
of other controls in it.

I'm mapping most of the textbox methods and properties to my
control using the textbox names. I'm having a problem with the
"Select" method. "Select" is a Visual Basic keyword, so the IDE will
not let me create that method. I'm currently using "Selects" instead,
but I like consistancy.

Anybody know a work around?


http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconKeywordsAsControlNamesInCode.asp?frame=true

http://msdn.microsoft.com/library/en-us/vbcn7/html/vbconElementNames.asp?frame=true
("Escaped names")

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (Shane) scripsit:
I'm creating a user control that has a textbox along with a couple of
other controls in it.

I'm mapping most of the textbox methods and properties to my control
using the textbox names. I'm having a problem with the "Select"
method. "Select" is a Visual Basic keyword, so the IDE will not let me
create that method. I'm currently using "Selects" instead, but I like
consistancy.

\\\
Public Overloads Sub [Select]()
...
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top