int is out of scope???

  • Thread starter Thread starter PJ6
  • Start date Start date
P

PJ6

(VS2003)

? int.Parse("2.0")
error: identifier 'int' out of scope
? "foo".IndexOf("o")
error: expression '"foo".IndexOf' out of scope

For the love of god, why is int and other basic stuff out of scope in my
Command window when I'm debugging?

VB doesn't do this, is this a C# thing?

Paul
 
(VS2003)

? int.Parse("2.0")
error: identifier 'int' out of scope
? "foo".IndexOf("o")
error: expression '"foo".IndexOf' out of scope

For the love of god, why is int and other basic stuff out of scope in my
Command window when I'm debugging?

VB doesn't do this, is this a C# thing?

Paul

Try adding a ; to the end of your statement..
 
PJ6 said:
(VS2003)

? int.Parse("2.0")
error: identifier 'int' out of scope
? "foo".IndexOf("o")
error: expression '"foo".IndexOf' out of scope


You'll be pleased to know that both examples work fine in VS2005 :-/

In VS2003 the following works OK:
?Int32.Parse("2")

and even
?"foo".Length

however, I can't get:
?"foo".IndexOf('o')
to work.
 
? "foo".IndexOf('o')
works...in vs2005
I kept getting "Command "?"foo".IndexOf('o')" is not valid.", until I
added the space.
 
I'm sorry for this post, Andy, I was angry at having to use C#, and moving
down from 2005 to 2003.

I'll try harder to be more polite in the future, I value the help I receive
in these newsgroups.

Paul
 
Back
Top