PC Review


Reply
Thread Tools Rate Thread

Re: Casting a String to a single character Array

 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      22nd Jul 2004
Hi,

Dim MyString As String = "Split me up"

Dim MyLetters() As Char = MyString.ToCharArray

For Each c As Char In MyLetters

Trace.WriteLine(c)

Next



Ken

---------------------------

"Larry Bird" <(E-Mail Removed)> wrote in message
news:8CF58079-9C05-4837-94A4-(E-Mail Removed)...
I have a character string that I want to place into an singel character
array. When I run the code below I get the following error: "Specified cast
not valid".

StatusBits is the character string that I want to place into the array
"StatusBitsArray"

Dim StatusBitsArray(8) As String

StatusBitsArray = StatusBits

What I'm i missing?

Thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Down-casting of Typed Collection (Casting Generic Types?) conchur Microsoft C# .NET 1 3rd Jul 2006 11:45 AM
Casting an Array of Objects to a typed Array Phil Jones Microsoft Dot NET Framework 2 14th Nov 2004 10:31 AM
Re: Casting a String to a single character Array Jay B. Harlow [MVP - Outlook] Microsoft VB .NET 0 22nd Jul 2004 02:29 PM
Re: Casting a String to a single character Array Jay B. Harlow [MVP - Outlook] Microsoft VB .NET 0 22nd Jul 2004 02:25 PM
string >> byte array >> string representation >> byte array >> string !! David Bargna Microsoft VB .NET 4 6th Oct 2003 04:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:09 PM.