How to transfer a string to char array

Discussion in 'Microsoft C# .NET' started by ad, Jun 19, 2005.

  1. ad

    ad Guest

    I have a string variable say:

    string sMyString="aeiou"

    How can I transfer sMyString into a char array?
     
    ad, Jun 19, 2005
    #1
    1. Advertisements

  2. ad wrote:

    > I have a string variable say:
    >
    > string sMyString="aeiou"
    >
    > How can I transfer sMyString into a char array?


    sMyString.ToCharArray()
    does that.

    --

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jun 19, 2005
    #2
    1. Advertisements

  3. ad <> wrote:
    > I have a string variable say:
    >
    > string sMyString="aeiou"
    >
    > How can I transfer sMyString into a char array?


    Please see the answers you received when you asked the same question
    yesterday.

    --
    Jon Skeet - <>
    http://www.pobox.com/~skeet
    If replying to the group, please do not mail me too
     
    Jon Skeet [C# MVP], Jun 19, 2005
    #3
  4. ad

    rossum Guest

    On Sun, 19 Jun 2005 19:38:39 +0800, "ad" <> wrote:

    >I have a string variable say:
    >
    >string sMyString="aeiou"
    >
    >How can I transfer sMyString into a char array?
    >


    Use sMyString.ToCharArray() as MuZZy/Andre indicated in his answer to
    your previous question on this subject.

    rossum



    The ultimate truth is that there is no ultimate truth
     
    rossum, Jun 20, 2005
    #4
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ted Sung
    Replies:
    1
    Views:
    738
    Ken Onweller \(.NET MCSD\)
    Feb 6, 2004
  2. Replies:
    5
    Views:
    317
    Jon Skeet [C# MVP]
    Oct 15, 2005
  3. Aykut Ergin
    Replies:
    9
    Views:
    794
    Aykut Ergin
    Apr 15, 2008
  4. Replies:
    1
    Views:
    155
    Marc Gravell
    Aug 19, 2008
  5. mohaaron

    string.Replace((char)146, (char)39) does not work?

    mohaaron, Jan 30, 2010, in forum: Microsoft C# .NET
    Replies:
    3
    Views:
    1,860
    Peter Duniho
    Feb 1, 2010
Loading...

Share This Page