#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    10
    Rep Power
    0

    Looking for help finding a C# function.


    I'm looking for a function simalar to the VB function InStr(). Could somebody help?

    Thanks inadvance.

    BTW: The function is to find a specific character is a string.
    Last edited by Paul Belanger; July 2nd, 2003 at 12:13 PM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    109
    Rep Power
    12
    string myString = "Happy";
    int myIndex;

    // Get the index of the first occurence of 'p'.
    myIndex = myString.IndexOf('p');
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    10
    Rep Power
    0
    Thanks...

IMN logo majestic logo threadwatch logo seochat tools logo