ad ha scritto:
> There are InStr in VB
> What is the C# equivelant of the function InStr in VB?
>
>
> ----------------------------------------------------------------------------
> ------------------
> SearchString ="XXpXXpXXPXXP" ' String to search in.
> SearchChar = "P" ' Search for "P".
>
> ' Comparison is binary by default (last argument is omitted).
> MyPos = InStr(SearchString, SearchChar) ' Returns 9.
>
>
SearchString ="XXpXXpXXPXXP";
int myPos=SearchString.IndexOf("P");
returns 8, the index is zero-based.
--
Free Download --> "AB...C#, Guida alla programmazione"
Il manuale per imparare c#, scaricalo da
www.dotnetarchitects.it
email:
(E-Mail Removed) (ROT13-encrypted)