Works fine... maybe your input is different than what you expect? Try interactively playing with the result of reader.ReadLine().

Example:

1
2
> ("hello \" world \" ").IndexOf(" \" ");;
val it : int = 5
By on 12/27/2009 7:38 AM ()

yes, but I don't have in the string that I got from the file "hello \" world \" "

I have- let's say "hello "world" "

because it read from file...

By on 12/27/2009 8:29 AM ()

If you wrote "Hello \" World" to a file it would be written as "Hello " World". Reading that line back in from the file would give you a string of "Hello \" World" which would then mean that indexOf("\"") would give you the index of the quote in the middle of the string.

I would think that you are not getting values you think. Might be with sticking a couple of printf's in to see exactly what values are being read.

By on 1/2/2010 3:30 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper