Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I just don't get it 1

Status
Not open for further replies.

MichaelRed

Programmer
Dec 22, 1999
8,410
0
0
US
New & confused. I am T R Y I N G to grow up to these new languages. I have the program (C# Express) and the Book(C# 2008) from Wrox.

as the old joke goes:

so far, so good

Chapter 2!!

Example from ye olde booke:

Code:
using System;

//CS(3,10) error CS1001: Identifier Expected
//CS(7,10) error CS1518: Expected class, delegate, enum, interface or struct
//CS(14,1) error CS1022: Type or namespace definition, of end-of-file expected

namespace.Wrox.ProCSharp.Basics
{
	Class MyFirstCSharpClass
	{
		static void  Main()
		{
			Console.Writeline("This usn't at all like Java!");
			Console.Readline();
			return;
		}
	}
}

the comments / error lines at the top added as the results from 'running' the code.

Anyone patient and merciful enough to try to get me past this?



MichaelRed


 
Should be:
1. no period after namespace keyword
2. class, not Class
3. WriteLine, not Writeline
4. ReadLine, not Readline
 
I'm in much the same boat - trying to forget most of what I know in order to make C# run - but I was puzzled about your error messages. Monkhandle has picked up the syntax errors but it's the appearance of the messages that puzzles me. I'm using C# Express too and when I pasted your code into the editor it put wriggly red underlines under the errors and showed me tooltips to identify my mistakes.

I bought one book which told me to start by writing my code in NotePad and then run a command line compiler. Is that what you're doing? I forget the name of the book (I've chucked it) but it was hard work and I'm getting on much faster now that I'm using the IDE.

Geoff Franklin
 
monkhandle

Thanks, it looks like (from here) that these corrections must have resolved the compliation issues. The comand line now returns the 'expected' text per the tome (WROX C# 2008).

I appear to still have simple issue(s). The tome indicates I should have an executable, and may execute it from the same command window. NOT!

I used ye olde search and still no results. Either the process did not work, or the executable isn't placed where I expect to find it.

Typing the expected name into the command window returns ~~ " ... is not recognized as an internal or external command, ... ".

So where on earth is "Carmine San Deigo" (or even on my computer would the executable be)?

Is there some c# setting that I need to look into which would say where the executable went? Why doesn't search find it?




MichaelRed


 
If you look under the folder structure for your c# solution, you should find a folder called bin. In there you will find two more folders one called release and the other called debug. Your executable should definitely be in the debug folder and depending on the compiler settings it may also be in the release folder.
 
Can you post the command line you used to compile your code?
 
Thanks for the attempts. Finally, after several variations of the search, I found the executable is buried in:
C:\Program Files\Microsoft Visual Studio 9.0\VC\ +
the appname.exe

Where VS 9.0 comes from is beyond me. Why the command line compiler places the exe in any specific / given location is beyond me.

On the bright side, having broken the barriers, I seem to be proceeding apace (all the way from pp 26 to pp 33 already today.



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top