|
-
May 12th, 2004, 06:13 PM
#1
Thread Starter
Lively Member
[RESOLVED] Character Arrays with Option Strict On
What's the proper way to cast this with Option Strict On?
VB Code:
Dim ReservedChars() As Char = {";", "/", "?", ":", "@", "=", "&"}
Thanks,
KT
Last edited by Kt3; May 13th, 2004 at 09:55 AM.
-
May 12th, 2004, 08:48 PM
#2
Sleep mode
Have you tried DirectCast function ?
But why would you do this ? and to what type do you want to cast it to ?
-
May 12th, 2004, 09:35 PM
#3
VB Code:
Dim ReservedChars() As Char = {Char.Parse(";"), Char.Parse("/"), Char.Parse("?"), Char.Parse(":"), Char.Parse("@"), Char.Parse("="), Char.Parse("&")}
-
May 13th, 2004, 03:06 AM
#4
yay gay
Better yet, just put one quote ( ' ) around each character:
VB Code:
Dim ReservedChars() As Char = {';', '/', '?', ':', '@', '=', '&'}
edit: Or maybe not, as in VB the ' is comment
\m/  \m/
-
May 13th, 2004, 06:43 AM
#5
I wonder how many charact
Originally posted by PT Exorcist
Better yet, just put one quote ( ' ) around each character:
VB Code:
Dim ReservedChars() As Char = {';', '/', '?', ':', '@', '=', '&'}
edit: Or maybe not, as in VB the ' is comment
Lol spoken like a true C# programmer!
-
May 13th, 2004, 06:48 AM
#6
I wonder how many charact
This is how you have to do it in VB.NET:
VB Code:
Dim ReservedChars() As System.Char = {";"c, "/"c, "?"c, ":"c, "@"c, "="c, "&"c}
-
May 13th, 2004, 09:55 AM
#7
Thread Starter
Lively Member
Most excellent, dudes.
Appreciate the help as always,
KT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|