Skip to content

What is the use of indexof ,CInt method in vb.net?

Asked Aug 22, 2007, 4:40 AM EDT1 answer
Share
LinkedInX

i m beginner to vb.net.. i want explanation for Indexof,Cint method in vb.net..

can u tell me with simple sample application.....

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    IndexOf is used to locate an object within another object. If you have a string and want to find a letter within that string you can go.

    String myString = "abc";
    int i = myString.IndexOf("a");
    in this case i is 1. the function will return -1 if the string is not found. You can also use IndexOf on Collections.

    Cint is used to convert to an Integer Data Type.
    String num = "1";
    int intNum = Cint(num);
    0