• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

vb.net indexOf method

Hi

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

what is the purpose of the 'c'

thanks
0
andieje
Asked:
andieje
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
the "c" indicates that the "?" is considered as data type char and not string.
0
 
abelCommented:
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 --
0
 
abelCommented:
Note that IndexOf returns -1 if the sought character is not found.
0
 
andiejeAuthor Commented:
thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now