Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CType story
Message
From
26/02/2011 04:31:41
 
 
To
25/02/2011 17:28:31
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01501880
Message ID:
01501908
Views:
69
>Am I the only one to whom this is happening, but everytime I want to define a valid label, sometime I hit a reserved word such as:
>
>
>        Public cType As String = ""
>
>
>Basically, in this case, c stands for Character and Type is a Type representation such as "Upload" in English or "Téléchargement" in French, depending on which language I am running on.
>
>But, the story is that CType is a reserved word by .NET. So, I always end up adding a number at the end to bypass it:
>
>
>        Public cType2 As String = ""
>
>
>Of course, it would be better if I could have used cType as is. But, I assume there is no other way around.

You can do it (but it is A REALLY BAD IDEA) eg:
Public Class Class1
    Public [Ctype] As String = "Hello"
End Class
Then:
Dim c1 As Class1 = New Class1
Dim theLength As Integer = c1.Ctype.Length
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform