IndexOf help

  • Thread starter Thread starter tomcat
  • Start date Start date
T

tomcat

I am trying to find the location of "\", I have tried "\\" and @"\".
but nothing work, can anyone help please?

Tomcat
 
It work when I have a string "ssss \aaa", but it doesn't work when my
string looks like "ssss\"
 
It work when I have a string "ssss \aaa", but it doesn't work
when my string looks like "ssss\"

tomcat,

Please post some code demonstrating the problem.

This line of code works on my system (.Net 1.1 SP 1):

int position = @"ssss\".IndexOf(@"\"); // position = 4.
 
Back
Top