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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top