Results 1 to 2 of 2

Thread: String Positions

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    1

    Question String Positions

    Ok, im new at c# and I'm having a problem with the program Im working on right now. Not sure if this is a stupid question or not but please try me.

    My situation right now is that I have for example a string="msdwsxdf!";
    now, what i want to do is get the positions of each character in that string e.g m=1, s=2, d=3, f=8 etc...

    ummm... so how do you do that here? I know that I would be using a for loop statement with this. But I'm not sure on how to get the position of each strings. Help?

    thanks in advance

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: String Positions

    Substring or IndexOf functions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width