Solved indexOf method

Posted on 2009-04-17
Last Modified: 2012-08-14

Please can you tell me what this means
     If (strUrl.IndexOf("?"c) >= 0) Then

what is the purpose of the 'c'

Question by:andieje
    LVL 142

    Accepted Solution

    the "c" indicates that the "?" is considered as data type char and not string.
    LVL 39

    Expert Comment

    it means that the overload method of IndexOf(char) is used. The method returns the index of the symbol (char) "?" inside the variable strUrl. If the method returns a value higher then or equal to zero, the If-statement is true. If true, it means that the character/symbol "?" is found in the string.

    -- Abel --
    LVL 39

    Expert Comment

    Note that IndexOf returns -1 if the sought character is not found.

    Author Closing Comment


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now