C Sharp Course

A blog for the C Sharp course at the University of Hull

Friday, September 17, 2004

Practical 01 - Getting a C# Program To Run

Today is our first proper practical. Do not be afraid. If you can read this you are already half way there. The classroom server can be found here. An html version of the lab can be found here. The login is your email address and your student number. As an example: - with an email address of: F.Bloggs@2004.hull.ac.uk - and a student number of: 200402232 Your username would be F.Bloggs and your password would be 200402232. If you try this and it doesn't work, please send me an email at systems@csharpcourse.com with your email address and student number and I'll add you manually. Note that your student number is the one that you got when you registered. It usually starts with the year that you arrived in Hull, i.e. for most of you 2004. Note that it is not your UCAS number. Please change your classroom password (you can do this with the change password link underneath your username on the login page). This password is separate from the other passwords that you use.

20 Comments:

  • At 17 September 2004 10:38, Blogger Genovacle said…

    Well... I thought i was tall at 6'4"!

    Think a good introduction, a bit more explaining on how the command words work i think would be useful - i.e explaining that "using system" is the libraries that the program will reference.

    What book do you recommend, I am coming from C and i'm finding it a little difficult to adapt to all the keywords... and gosh is it Case Sensitive! A few practise exercises would be good i think.

     
  • At 17 September 2004 11:48, Blogger Moffmo - AKA - Matt said…

    I thought it was a good intro...

    I even learnt some ms dos ;)

     
  • At 17 September 2004 11:56, Blogger Ksmiler said…

    Thanks for the introduction to C#.

    (To Genovacle) Which C compiler did you use when you were making C programs? I thought every compiler's command syntax were case sensitive.

     
  • At 17 September 2004 12:57, Blogger VivaLaDan said…

    A nice introduction once again. I'm still a little hazy of how this time table is working but labs seem like good fun.

     
  • At 17 September 2004 14:45, Blogger Zero said…

    A nice introduction for me, having never done programming before it seemed a simple enough start, although as previously posted, I would have liked a bit of a key to as to what the keywords actually meant, rather than just putting them in "just because"

    Sure this will come next though.

    Anyone else beat my naff maths result of 36%? I never thought I would forget that much after 2years without using maths more than basic algebra in physics!

    ReadLine kept getting me, keep thinking english too much "Readline"

    Think I've nearly got the whole timetable situation sorted... I hope...

     
  • At 17 September 2004 15:19, Blogger Genovacle said…

    77% and i did A level Maths - forgot some of the stuff as well - i mean are we going to remember trigonometrical identities after 16 weeks of doing nothing lol! About 5 questions i couldn't work out how to input the answer! Why didn't they give us a (proper) pen and paper test.

    I covered a lot of ANSI C using the GNU compiler which is free to download, has several libraries etc. Probably because i'm not used to the new language.

     
  • At 17 September 2004 15:51, Blogger Ksmiler said…

    I had the same problem as Zero whereas I kept on typing in 'Readline'.

    [Genovacle] "Probably because i'm not used to the new language."
    Ya, its very similiar to c++ coding cept those new fandangled stuff like 'Console.WriteLine'.

    *sigh* Give me cout and a colour coded editor anyday -__-.

     
  • At 17 September 2004 17:49, Blogger Genovacle said…

    Were we told how to D/L microsoft stuff?

     
  • At 17 September 2004 18:46, Blogger VivaLaDan said…

    [Genovacle] They haven't told us where to get it from yet. Its a Microsoft server we will be downloading from and Microsoft don't have it running properly yet. Darren McKie told me we'd all get an email in a week or so with our usernames to access it.

     
  • At 17 September 2004 19:47, Blogger Genovacle said…

    I'm trying to get the .NET SDK to compile my code , thing is the csc command isn't recognized through command - is there somthing i've missed or do you need visual studio?

     
  • At 17 September 2004 20:33, Blogger Rob Miles said…

    You probably need to have your path set up. Not sure where the SDK is stored but you needto set this. Google "net sdk path" and that should sort it.

     
  • At 18 September 2004 00:05, Blogger Oliver Taylor said…

    Hmm, Anyone else do any error catching on the sums problem? The two main issues were the Buffer overflow on a number larger than that which can be stored in an int and the user entering non-parsable data, i.e. Letters and special characters.

    I used:

    class Myclass
    {
    ......
    Public Static Int number1, number2;

    Public Static Void Main()
    {
    ...

    try
    {
    number1 = int.parse( ReadLine() );
    }
    catch
    {
    WriteLine("Invalid Input");
    }

    ...

    I started using catch with FormatException, but if a large number was entered it wasnt caught, so this method catches all variants of the base type Exception which seems to work well.

    Thoughts? comments? Improvements?

     
  • At 18 September 2004 14:30, Blogger Rob Miles said…

    Whoa! Try cath constructions. Good stuff. They handle what the program must do when bad things happen. We will come to them a bit later in the course. As for a good book, I'll be talking about books in the next lecture, and I'll bring along a couple for you all to look at.

     
  • At 20 September 2004 13:19, Blogger ./orta said…

    Hey, I'm with the Maths and Computer Games Design course, and so far have only managed to get to one programming 'lecture' (It was sitting down and doing the stuff from this blog.) everything seems nice. Shame I've missed about 4-5 lecures but I'm sure I can catch up as I'm only doing Programming1! The rest I can do off the internet in my free-time to keep up with the Computer Science lot. Nice idea on the blog, and keep it updated. (Oh I read you liked watches, this is close but still cool here, this confuses everyone coming into my room.)

     
  • At 20 September 2004 13:25, Blogger ./orta said…

    Windows XP operates by using MS-DOS. (Ans = False)

    I always thought that Windows was just a GUI on top of DOS? How many others got that wrong

     
  • At 20 September 2004 14:24, Blogger VivaLaDan said…

    Traditionally Windows was just a GUI running ontop of DOS. Windows XP is the first version to do away with the DOS backbone as far as i know.

     
  • At 20 September 2004 15:12, Blogger Genovacle said…

    Anyone know where I would find a list of .NET keywords and classes?

     
  • At 20 September 2004 16:38, Blogger Genovacle said…

    Not sure about the practicality of that alarm - but deffo geeky!

     
  • At 21 September 2004 15:45, Blogger ./orta said…

    Geno, chances are the MSDN will contain all you need. If you ge the C# VS.NET IDE (Its only 30 meg) its a legal download from M$ it is beta but I've found no problems yet. http://lab.msdn.microsoft.com/express/vcsharp/vcsharpmaninstall/default.aspx

    Anyone know how to make a certain colour transparent in image Buttons?

     
  • At 26 September 2004 02:20, Blogger Genovacle said…

    before and including win9x, win was just a GUI running on DOS, but Win 2000/XP changed all that.

     

Post a Comment

<< Home