Content Obsolete

This content is no longer current. Our recommendation for up to date content: http://channel9.msdn.com/Series/C-Fundamentals-for-Absolute-Beginners

Creating Your First C# Program - 02

Download this episode

Download Video

Download captions

Download Captions

Description

This lesson teaches you how to create a simple application—first using Windows Notepad and the C# Command Line Compiler, and then by using Visual Studio or Visual C# Express Edition. The point of this episode is to demonstrate how utilizing an Integrated Development Environment (IDE) is far easier than attempting to work using a loose collection of windows and tools. The video concludes with an explanation of common solutions to the many different problems you might encounter as you first begin writing and compiling code.

Download the source code for Creating Your First C# Program

 IMPORTANT UPDATE:  Before you watch this lesson, please make sure you have watched this video to learn about changes to Visual Studio since this series was originally recorded.

Tags:

C#, Visual Studio

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      quattro

      Awsome Angel

    • User profile image
      Jane

      Thanks!

    • User profile image
      Wmsi

      Excellent. Can't wait to work through the rest of the series

    • User profile image
      ptbstudy

      is it my pc problem or what i can see anything you type on the note pad .

      i only see funny char.

    • User profile image
      jamp

      Video resolution too low for a big screen (1680 X 1050) cant see the words on notepad

    • User profile image
      Chairat_​Tangthong

      Thank you for great tutorial that i was understood foundamental of C# language

      One thing to note that your VDO is not high resolution that it doesn't see your code at all.

      Thank you.

    • User profile image
      Justin

      I can only read parts of what you are typing at 2:36 and beyond. Otherwise some of the words/letters are hard or not possible to read because the type is so small.

    • User profile image
      Iba

      Very clean and awesome

    • User profile image
      R_Haddad

      Awesome!!

    • User profile image
      BobTabor

      @Chairat, @Justin ... and future reference for others ...

      Short story: If you are streaming the videos you can try using the expand icon in the video player to view the video full screen.  If, when in full screen mode the text is garbled, then you must DOWNLOAD the video to your computer first (see downloads to the right of the video player) to watch it using Windows Media Player (or other media player).

      The videos were recorded in High Def resolution, 1280 x 720 (so, 720p).

      Long story: After recording the videos, Channel 9 encodes the videos for streaming using Silverlight Smooth Streaming.  Based on your bandwidth, computer processor, etc. enough video data is sent to render the video as best as possible to avoid gaps or pauses in playback.  With "live video" like a movie or tv show, this usually means the video is pixelated but still acceptable.  With screen cast videos where you are trying to read the small text on screen, this usually renders the text unreadable.  The solution, as I mentioned previously, is to DOWNLOAD the video to your local computer THEN watch it.

      Hope that helps!

    • User profile image
      Paul Gich

      Your excellent videos would be complete if we can download the exact script of your speech.
      Thanks

    • User profile image
      Paul Gich

      Your excellent videos would be complete if we can download the exact script of your speech.
      Thanks

    • User profile image
      Rituraj Jain

      Sir,

      i would like u to please tell me a book which is best for learning C# with .net so that i can make my C# concepts more strong.
      sir please help.

      thank u

    • User profile image
      HEROLD

      Thanks. It's really a good start for me now that I'm learning Razor. Can't wait to go through the whole process, but I'll be taking it one at a time.
      By the way, what's the meaning of :
      using System;
      using System.Web
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;

      Thanks

    • User profile image
      Naqi Agha

      Heyz...!!
      First of all man nicest WORK! Thanks a ton for this great help... I was starving for such help Thanks once again :)
      and sir is it possible to download this complete series on my PC through torrent download..
      As my streaming is too slow.. once it'll be completely downloaded i can learn from it without any waiting and interruption. please do consider my request.
      And please if its possible for you to provide some guideline for MCTS preparation, please help me on this too.

      ThanKS!!

    • User profile image
      BobTabor

      @HEROLD: I believe we do talk about the using statements later in this series when I talk about Namespaces.  Stay tuned!  Smiley

      @Naqi Agha: I believe each video has a download link at the very top of this and every Channel 9 video page.  I don't know if there's a torrent for it ... I would doubt it would come directly from Channel 9, but I could be wrong.

    • User profile image
      BobTabor

      @Rituraj Jain: For the basics, I like the Microsoft Press books, especially their Step-By-Step series, and anything written by Matthew MacDonald.  (I've never met him ... no financial incentive here at all.)

    • User profile image
      Algorithum

      Actually to do this command I had to use this command line code:

      csc /t:exe /out:C:\HelloWorldcs/HelloWorld.exe C:\HelloWorldcs\HelloWorld.cs

      So I had to add the C:\ to the cs file!  I am using windows vista

    • User profile image
      Algorithum

      Also is it possible to compile multiple files on the command line?

    • User profile image
      RDL

      Great video, very easy to follow and the way you present it makes it so much less painful than other tutorials.

      For the people that seem to be having issues with not seeing the text on Bob's notepad, hit ctrl and zoom in on your webpage, the text becomes clear as day.

      Thanks.

    • User profile image
      Jhumir Benedicto

      Thanks i learn lot.

    • User profile image
      BobTabor

      @Algorithum:Yes, it is absolutely possible.  Check out this link:

      http://msdn.microsoft.com/en-us/library/78f4aasd.aspx

      And see this line:

      csc /define:DEBUG /optimize /out:File2.exe *.cs

      That last part *.cs tells the compiler to compile all the .cs files in the directory.  There are A BUNCH of command line options ... I only demo'd the tip of the iceberg.

      Hope that helps!  Best wishes in 2012!

    • User profile image
      Alan

      Great videos. My skills are rusty, and were never great to start with,so this is a good refresher. But I suggest:

      1. In Notepad, select Format ->Font before recording a video, and make the font BIG. For something as simple as HelloWorld, a size 28 font should be readable on any video stream.

      2. My own "gotcha" - spaces in directory names. If you have a space, the destination string AND the target string each need to be put inside quotes.

    • User profile image
      BobTabor

      @Alan:  Hi Alan, thank you for the suggestions.  Actually?  I just wrapped up a new series for Channel9 two days ago and did exactly as you suggested ... not 28pt, but 18pt w/ bold.  HOPEFULLY that's good enough (!!!)

      re: spaces and directory names ... absolutely, and that is why I rigged the example to be created at c:\whatever instead of c:\what ever.  Smiley  I agree, that can be frustrating.  Fortunately, most of us rely on Visual Studio or the Express Editions to make all that stuff trivial.

    • User profile image
      Mamoun Saeed

      Great videos

    • User profile image
      abid ali

      sir this is very good fundamental videos of c# thanks alot.

    • User profile image
      Aleksander

      The C# .NET Framework tutorial is awesome.
      Microsoft partners has a very good idea to build this.
      At this time I`am programming in c++ but I can learning a C#.
      Thanks Microsoft!

      P.S Sorry my English at the moment isn't very good.

    • User profile image
      BobTabor

      @Mamoun Saeed:  @abid ali:  @Aleksander:  Thank you, all. Smiley

    • User profile image
      Bakeca Roma

      Great videos.Thanks

    • User profile image
      Joe

      Thanks Bob! I dabbled a bit with C about 20 years ago...barely got past "Hello World"...hehehe. I know I am going to enjoy going thru your lessons. I consider myself a "Utilitarian" programmer. I learn what I need to accomplish the task at hand. I have managed to do this with HTML, CSS, javascript and PHP...so the little foundation I have has already helped.

    • User profile image
      Young

      These are great videos! I have no programming background, so I was intimidated to start. But your video helped me see that it's not all that complicated and crazy. Thanks a million!

    • User profile image
      steve

      I got this c:\HelloWorld\HelloWorld.cs(5,32): error CS1010: Newline in constant
      Please help...

    • User profile image
      BobTabor

      @steve:  Hey Steve, could you post your code?  I'll try to help you through it.  Keep in mind: the purpose of the exercise was NOT to discourage you completely, just to discourage you from trying to type all your code in Notepad and compile in the command line compiler.  If this doesn't work, I recommend shrugging it off and moving forward.

    • User profile image
      Steve

      public class HelloWorld
      {
      public static void Main()
      {
      system.console.WriteLine("hello world!);
      system.console.ReadingLine();
      }
      }

    • User profile image
      thens

      Hi Steve,

      Please correct the code as follows:

      public class HelloWorld
      {
      public static void Main()
      {
      // Please ensure that as mentioned by Bob you are typing the code with case sensitivity,so here you have to type the system.console as System.Console
      
      // Here please add quotation ( " ) near the !, which means that you are completing the string.
      System.Console.WriteLine("Hello World!"); 
      
      //Change the ReadingLine to ReadLine
      System.Console.ReadLine();
      
      }
      
      }

       

      Hope this helps!!

       

      @Bob :

      Hi Bob, i was able to clear the errors but do know what the error exactly means so Could you please clarify what is that error "NewLine in constant" ? 

      thens  Smiley

    • User profile image
      BobTabor

      @thens: @Steve: Thank you, thens, for the corrected code!  re: your question ... I don't know for sure, but I have a feeling the error had something to do with the command line compiler and the arguments Steve set it to.  It never got to the line of code: Console.ReadlingLine() ... which would obviously fail.

      @Steve:  Remember -- this is an exercise in preciseness ... things must be typed in EXACTLY as I do them down to the same words and punctuation.  Best wishes!!!

    • User profile image
      Steve

      Thanks @thens and Bob!!! Got it!!!

    • User profile image
      thens

      @BobTabor:Thanks Bob Smiley

      @Steve: Welcome steve, Happy Learning & Coding Smiley

    • User profile image
      Reynaldo Guiza

      I have tried to follow your video "Creating Your First C# Program - 02" but I could not make the screen bigger and I was not able to see clearly what appeared on the screen. I apologize for this so simple question, but I would appreciatte your help.














      Creating Your First C# Program - 02

    • User profile image
      Amnon

      Amazing videos.Thanks

    • User profile image
      BobTabor

      @Reynaldo Guiza:  Hi, and sorry you're having a problem viewing.  If you're having problems viewing, I strongly recommend that you download the files to your local computer and view in full-screen.  You will need to see my code throughout the series.  Hope that helps!!!

    • User profile image
      Stephen

      Hi, I am having a problem in cmd with the exe.
      Here is a screenshot of the error.
      http://i.imgur.com/MWo5A.png

    • User profile image
      Stephen

      Never mind i went through the video again and in the notepad part i did not capitalize Main in "public static void Main()"

    • User profile image
      Nadeem Akhtar

      i am create a video player in C# application but his not complete plz help me ? plz send player sorce code my E mail ID plz
      thank you Sir

    • User profile image
      Valentine

      Thx you:)

    • User profile image
      Muhammad Waqas Akram

      Great Job Sir, I want to clarify my concepts of C#, please guide me and I also want to develop my Final Year Project using it,
      May I do it???
      Please reply me to my e-mail id. i mentioned above

    • User profile image
      Steve

      The cmd line attempt failed. Here's the information:
      C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>csc /t:exe /out:C:\HelloWorldtest\HelloWorld.exe C:\HelloWorldtest\HelloWorld.cs
      Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
      Copyright (C) Microsoft Corporation. All rights reserved.

      error CS0016: Could not write to output file 'c:\HelloWorldtest\HelloWorld.exe'
      -- 'The directory name is invalid. '

      C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>

      I would appreciate any information on how to correct this.

      Thanks,

      Steve

    • User profile image
      BobTabor

      @Steve: I would make sure that the directory you are referencing is valid.  Are you SURE it is spelled EXACTLY the way that you typed it into the compiler's command?  ALSO don't get stuck here ... the point of this exercise was this this is really tough to get right ... and so you should be using Visual Studio because it takes care of frustrating things like this!  Smiley  Best wishes!

    • User profile image
      aditya

      good resources i hav ever seen....

    • User profile image
      WALE

      TANKS FOR THE TUTORIAL ,I WILL SEE B/C I LIKE C#

    • User profile image
      roniv

      Hi Bob,

      I am excited to view your videos but I am having a very difficult time.  I have tried streaming and it buffers forever.  I have also tried downloading the second video twice and it took 6 or more hrs to finally get to 98% and then it failed.  Can you suggest a better way to view your videos or perhaps what I'm doing wrong?

       

      Thank you

    • User profile image
      roniv

      I may have resolved my download issues.  I think it is my internet provider.  I was quickly able to download them from work.  

    • User profile image
      Mohit

      Thanx Bob sir for awesome videos....

    • User profile image
      preetham6900

      thanks a Lot SIR. Ur videos Helped me a lot!!

    • User profile image
      Chomneau

      Thank you Bob for these Video! I love it!

    • User profile image
      Neo

      Hey Bob , your style of teaching is amazing. I think words fall short of what you have delivered (Style, professionalism, attitude to teach. This is no flattery but having C# as free series is a blessing for all the folks who want to be programmers in the Microsoft realm, which usually cost $$$ outside especially in this economy.

      Bob . One again you rock!

    • User profile image
      Neo

      If you debugged the above message, there is a build error (haha) . Closing ")" braces missing after the word teach on line 3. Great way to teach troubleshooting.

    • User profile image
      BobTabor

      @Neo:  Smiley  I had to read that a couple of times to get the joke.  Nice.  Smiley

    • User profile image
      Ramya

      I want to study the fundamental of c#, please tell the best book that I can simply understand the language.

    • User profile image
      Dawc

      Hi Bob, thanks a lot. I'm so excited about this series. I just wish there was an option to download all the videos at once. For I assure you... They will be eventually. ^_^

    • User profile image
      Ian Nunes

      Hey Bob, I am running Visual Studio Express 2012 for Windows 8. I am not sure how to start a new console application. I can't see any option for it when I click file>new project. Thanks for your help!

    • User profile image
      james gain

      Reviewed some of the comments. Have a terrible time actually seeing what he is typing. On my ipad I can scrub but can't see what Bob is typing. On my computer, pretty new, widescreen, I also can't see what Bob is typing, even almost when its in fullscreen! Is there anywhere to go to see these videos larger. Seems like a great series....

    • User profile image
      viraj parikh

      thanks alot bob ...

      can you upload series of sql server !!
      i am keen to learn that topic !!

    • User profile image
      arda

      I just would like to say some words in my own language.
      Allah razı olsun...

    • User profile image
      gamerman831

      I have been trying to teach myself C-languages for a while now and these videos have been a great help to me in regards to following along. Thank you all very much for giving your knowledge to others. Five year plan; HERE I COME!

    • User profile image
      Rasika

      thanks Bob :)

    • User profile image
      muyiwapaul

      challenging

    • User profile image
      washerguy1

      Yes hello Bob I know you are one of those people that were abducted by the aliens and they injected you with super intelligence and now you are trying to teach us how to say “hello aliens” and I am trying hard to learn the language. I think I just need to give my programing more memory. But seriously thank you for your generosity this is helping me with my college courses

    • User profile image
      Technec79

      Hi Ian,

      I was running into the same problem in trying to follow along. You will need to download Visual Studio Express 2012 for Windows Desktop. At which point, the Console Application template will become available under Visual C#. Hope that helps.

    • User profile image
      Lecia

      This is a wonderful resource, the fact that it is free and you still answer questions is astounding to me! You sir are a good man. I believe my machine just might be possessed, here is my code and the resulting error message I received:

      ------------

      C:\Windows\Microsoft.NET\Framework\v4.0.30319>csc /t:exe /out:c:\HelloWorld\Hell
      oWorld.exe c:\HelloWorld\HelloWorld.cs
      Microsoft (R) Visual C# 2010 Complier version 4.0.30319.1
      Copyright (C) Microsoft Corporation. All rights reserved.

      c:\HelloWorld\HelloWorld.cs(5,30): error CS1010: Newline in constant

      C:\Windows\Microsoft.NET\Framework\v4.0.30319>

      -----------

      I'm running Windows 7 on an Alien Desktop. Continuing on with the tutorial, many thanks!!

    • User profile image
      Lecia

      Found it.... it was a missing " in the HelloWorld.cs

      :)

    • User profile image
      Sen Can

      Thank you for the great videos. I just started wish me a good luck.
      Regards,
      Sen

    • User profile image
      jhanak

      thank you sir , this is best video .

    • User profile image
      SenCan

      I am curious if Bob is still around. He hasn't been on for a long time now, may be since September 2012???

    • User profile image
      Rocco Pietrofesa

      He thanks for the video series. I'm a total beginner and trying to learn c#. I have visual studio express 2012 for windows8 and blend. What I've discovered is that I can't make console apps in this IDE. Is there an easy way for me to translate your lessons into this environment?

    • User profile image
      LD

      What it would be nice if this new lovely video player will stay full screen when you click on another app. I have 2 monitors so trying to be multitasking and learn in the process. I hope somebody from Channel 9 will catch this. Best regards to all and yes a nice and good show. Planning to watch them all and redirect juniors to this videos. Thx.

    • User profile image
      rbojorgee

      nice! I start the videos yesterday and I'm using visual studio express 2012, all is ok with the first video...  Smiley

    • User profile image
      tarun

      sir i have visual studio 2012 express edition ..should i have to install the previous version for learning of c# because their isnt any console application in the newer version of visual studio

    • User profile image
      tarun

      sir i have visual studio 2012 express edition ..should i have to install the previous version for learning of c# because their isnt any console application in the newer version of visual studio

    • User profile image
      Marcel

      Hi Bob,

      I use Windows 7 (like you), in the prompt I do get a error:

      CS5001: program 'c:\HelloWorld\HelloWorld.exe' does not contain a static
      'Main' method suitable for an entry point

      How can I fix this?

      Thanks in advance.

      Regards,
      Marcel

    • User profile image
      Marcel

      Hi Bob,

      I use Windows 7 (like you), in the prompt I do get a error:

      CS5001: program 'c:\HelloWorld\HelloWorld.exe' does not contain a static
      'Main' method suitable for an entry point

      How can I fix this?

      Thanks in advance.

      Regards,
      Marcel

    • User profile image
      Marcel

      ok this wasn't supposed to happen but by refreshing the page (video stopped) my question got uploaded again.

      Sorry. :)

    • User profile image
      Marcel

      Could anybody please help me with the cmd error?

      Thnx.

      Marcel

    • User profile image
      Marcel

      Okay.....solved it as Bob tells us 1million times check your writing...and I wrote 'main' instead of "Main"...Oh boy. Feel like an 3th grader.

    • User profile image
      Marcel

      Hi All,

      I use Visual Studio 2012 Express for web and I cannot sellect "Console Application"???
      Please don't tell me that I have to install an different vs of Visual Studio...:(

      Marcel

    • User profile image
      gduncan411

      @Marcel: Yep, you'll need Visual Studio 2012 Express for Windows Desktop (not web).

      Bob, mentions it above;

      IMPORTANT UPDATE:  Before you watch this lesson, please make sure you have watched this video to learn about changes to Visual Studio since this series was originally recorded.) 

      In that Important Update post he also provides a link to Download Visual Studio 2012 Express for Windows Desktop

    • User profile image
      mducrocq68

      @gduncan411: Heard and read it...how could I miss that one...well....let's download.

      This an tutorial not for web programming is it, is it still an good basis for learning C#?

       

      Thnx

    • User profile image
      gduncan411

      @mducrocq68: Yes, this is a great series to learn C#.

      That said, there's a number of other great that are also web focused. You can see them all here, Channel 9 Content for Beginners

    • User profile image
      mducrocq68
      Excellent thanks. There's only one available "Javascript Fundamentals" and I am looking for one with the C# language. The rest is more for W8 App or phone I will follow this C# and hoping that there will be an more web application (pages) version in the future posted by Bob.
    • User profile image
      hpar108

      This tutorial is freaking awesome! Thanks heaps Bob...Cheers Smiley

    • User profile image
      Hoang Giang

      hello everybody !
      i not build file.cs to file.exe using prompt commands from file.batch
      i has write file.batch :

      G:\test C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe out.exe test1.cs
      pause

      But it is not run !
      please help me !
      Thanks

    • User profile image
      xuy

      How slow the network is!
      Maybe I choose a bad time to watch this video(I Live in China so the New York time is 4:30 in the morning when I was watching this episode).

    • User profile image
      Holden326

      hi bob, may i ask why can not i find a release folder inside the folder bin in my documents. im using visual studio 2010 ultimate version

    • User profile image
      ALex617

      Nice tutorial. 5 Stars.

      This lesson really taught me the 

      Console.WriteLine("Hello World");
      and
      Console.ReadLine();
      the hard way. (Notepad)

      What i like about this series is that it shows a way to correct your errors and tips in coding.

      This series is good today and should be good in the upcoming years.

    • User profile image
      BlueEzio

      I'm starting to love these tuts! Thanks a lot Bob and I hope I'll learn C# and get into my dream of learning to build apps within a year or two. Can't focus completely here as its my last year in High School. I'm happy I found a place where I can learn freely and with the help of an expert. Smiley

    • User profile image
      Muqtasid M

      Hey, I just tried compiling that in Visual Studio 2012 but I'm getting errors, and when I hover over the red lines, it says "Identifier expected" what can I do?

    • User profile image
      Muqtasid M

      Oh darn, I had a period before the parenthesis! You're right about needing an eye for detail!

    • User profile image
      meenakshi1

      Love these videos  Bob, you explain clearly and love to learn from your videos.Being a fresher its very useful for me and thanks a lot in making concepts easy for me to understand.KUDOS

    • User profile image
      meenakshi1

      sir suggest me a book to learn C# and .NET

    • User profile image
      ericCodes

      Is there a page somewhere with a transcript of this series like the one provided with the Windows Phone 8 for Absolute Beginners series?  The transcript is incredibly helpful.

    • User profile image
      Clint

      @Holden326: chances are you only have a debug folder as you aren't doing a release mode build. 

    • User profile image
      Clint

      @Marcel: check the included sample, your syntax is incorrect for your first line chances are

    • User profile image
      Clint

      @ericCodes: this was something we learned to do.   Wp8 was the first series we did that.  Much like we learned to do the fundamentals series after the first wp7 series and realized we would have to teach if statements and the basics every time versus just jumping in.  These series are big undertakings. 

    • User profile image
      Steffen

      Hi Bob!

      The console Version does not cause any Problems, but the VS 2012 Version did. If i press the compile button an error exists, that says

      Fehler 1 Die Anwendungskonfigurationsdatei "App.config" ist ungültig. Das Stammelement ist nicht vorhanden.

      That means the App.config is not valid. But what can i do? The App.config is in the Folder the error tells me.

      Thanks, Steffen

    • User profile image
      Steffen

      I solved that Problem by removing the App.config from the Project. But i would be interested to know what that means.

    • User profile image
      Insomniacjr

      Awesome Video! Great explanation!

    • User profile image
      Clint

      @Steffen: we build the videos under 2010, I'd have to dedicate some time to seeing what is up.  Can you describe a bit more about how built out your project?  Was it file->new from VS 2012/2013?

    • User profile image
      Konraden

      Does anyone else feel like Steve Martin is teaching how to write in C#?

    • User profile image
      AKSHAY GUPTA

      Excellent..

    • User profile image
      Andy Sloan

      Bob I can't tell you how pleased I am to have stumbled across this. There's a wonderful clarity in your work.

    • User profile image
      jecalderon

      Bob.. I am using W8 with VStudio 2013.. Following the video was not able to find the compiler. There is no Framework.NET folder or Framewor folder. Has this been move to another Location?

    • User profile image
      thenerd

      I added the path of the C# compiler under path in environment variables.

      But still csc is not being recognized in other directories. Why??

    • User profile image
      Clint

      @jecalderon: use the "windows desktop" version of express for the fundamental series.  We recorded this series before that shift came out.

    • User profile image
      lee

      Bob...fantastics videos and enjoying the clear tutorials. I've followed the instructions to the letter but at the command prompt I get an error after adding the cdc /t:exe /out:c:\HelloWorld\HelloWorld.exe c:\HelloWorld.cs

      the error read
      C:\HelloWorld\HelloWorld.cs(5,19): error CS0117: 'System.Console' does not contain a definition for 'writeline'

      i'm using windows 8.1 incase that should make a difference?

    • User profile image
      Clint
      @lee: casing matters in c#. WriteLine is what you want.
    • User profile image
      ginksi

      error cs0103 when compiling

      code:
      public class HelloWorld
      {
      public static void Main()
      {
      system.console.WriteLine("Hello World!");

      system.console.ReadLine();
      }
      }

    • User profile image
      HariBabu

      @BobTabor finally i got good teacher thank you BobTabor .My i know which keyboard your using ?

    • User profile image
      Clint

      @ginksi: c# is case sensitive.  System and Console both need to be cased properly. 

    • User profile image
      SeniroDev​Khalid

      please help me iam a beginner developer and i need links to learn C# please  want to learn but i need anyone helps me only i need link Sad

    • User profile image
      Clint

      @SeniroDevKhalid: watch the 24 part series that you just posted on Smiley

    • User profile image
      Victor

      Pretty good video. I don't understand anything but I was able to follow the steps and finish the exercise. Soon enough everything will take meaning.

    • User profile image
      Clint

      @Victor: this was to get you started, 24 total videos

    • User profile image
      Unbuilt

      Can someone help i am getting an error it just says

      c:\HelloWorld\HelloWorld.cs(5,45): error CS1002: ; expected

    • User profile image
      perezdi

      Very nice. Started today. Smiley

    • User profile image
      perezdi

      @Unbuilt:it seems like that there is a " ; " missing somewhere after your code.

    • User profile image
      Duncanma

      @perezdiMadUnbuilt: Yep, that's probably correct... Unbuilt, if you want to paste more of your code in, that would help. Otherwise, I would look at the code and see where Visual Studio has put any red squigglies, and check out *around* line 5 (could be the line before) to see if each of your lines has been correctly terminated with a ; (semicolon)

    • User profile image
      stephanie hallberg

      Why you said we should use Express 2012, when you are using 2010?

    • User profile image
      cmaja

      Hi Duncanma

      Could I ask you, when other videos of this series will have captions?

      I completed a series of "HTML5 & CSS3 Fundamentals: Development for Absolute Beginners" to the end. They helped me your captions, thank you very much.

      Thank you for your answer.

      Regards Marek

    • User profile image
      Old​Programmer

      Hello All

      I get a CS0103 error. The name 'system' does not exist in the current context.  Using Windows 8.

      public class HelloWorld
      {
         public static void Main()
           {
             System.Console.WriteLine("Hello World!");
             System.Console.ReadLine();
           }
      }

    • User profile image
      Old​Programmer

      This is my command line I'm using

      C:\Windows\Microsoft.NET\Framework\v4.0.30319>csc /t:exe /out:c:\HelloWorld\Hell
      oWorld.exe c:\HelloWorld\HelloWorld.cs

    • User profile image
      Chadvez

      Hey can I use Visual Studio for Windows Phone in these lessons, I didn't see the console option and I stopped there.

    • User profile image
      SUDARSAN

      As we know that, if any function declared as 'private' then you can not access it from out side of the class.But here is an example, that I want to show you, and I want to know that how and why it is possible....PLEASE HELP ME BOB SIR......

      using System;
      class Program
      {
      static void Main()
      {
      Sub.timer();
      //Sub obj = new Sub();
      //obj.timer();
      }

      //private void timer()
      private static void timer()
      {
      Console.SetCursorPosition(0, 0);
      Console.Write(DateTime.Now);
      System.Threading.Thread.Sleep(1000);
      timer();
      }
      }
      class Sub : Program
      {

      }
      If u she the code i declared 'timer' function as private in the program class. One more class I declared as 'Sub' which one is inheriting the 'Program' class.Now when I am going to access the timer function using the Sub class in Main function I can access the timer function,but how it is possible because the timer function is declared as private.....

      please reply me
      thank you

    • User profile image
      adar

      hey great tutorial although I get an error at the last section whet i write (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>csc /t:exe /out:C:\HelloWorld\HelloWorld.exe C:\HelloWorld\HelloWorld.cs)
      not including the Bracket i get this error
      error CS2001: Source file 'C:\HelloWorld\HelloWorld.cs' could not be found
      warning CS2008: No source files specified
      what does it mean?

    • User profile image
      jonathanfbe

      Great tutorial!

      I'm starting today with this series of videos, hope I become a decent programmer :)

      Thank you.

    • User profile image
      cmgx

      @adar I think your problem may be that you capitalised the "C" in "/out:c:\Hello" etc.

      This was a great tutorial, thank you!

    • User profile image
      Jordan

      I'm kinda of new to this, but definitely not stupid. My question is what exactly we're we doing. My take on it was that we created a file in c# then used the command prompt to compile it into a exe file that can actually be run?

    • User profile image
      zhendong

      Nice ~ Having English Caption can be better!

    • User profile image
      ChrisFern

      Glad I stumbled upon these tuts. I'm a budding game developer who has a big background in art and design, but the one thing that I have no experience in is programming. These tutorials are a great first  intro to programming thanks a bunch!

    • User profile image
      Apex

      At the last cmd step it says error cs0234 the type message console does not exist.. Plz help

    • User profile image
      ghadeer

      hello, so my problem is when i first open the cmd i have :
      Microsoft Windows [Version 6.1.7601]
      Copyright <c> 2009 Microsoft Corporation. All rights reserved.
      C:\Users\Sony

      while u have C:\Windows\system32> so is it okay? shall i continue normally or ...what ?

    • User profile image
      Brian

      Ghaddder, you will probably want to right click it and hit "Run as Administrator".
      or while in cmd you can type " cd C:\Windows\system32" with out the quotation marks.

    • User profile image
      Jeff

      Hi Mr. Tabor,

      So I just started to follow your video and I did what you said. Though I do not like the placement of the folder "HelloWorld" where you put it. I prefer it having it in my documents. So I understand that you did what you did for simplistic reasons though I always have love to complicate my life to have the results that I want (to be better organized). So that what I wrote "C:\Windows\Microsoft.Net\Framework\v4.0.3019>csc /t:exe /out:c:\Users\Jeff\MyDocuments\HelloWorld\HelloWorld.exe c:\Users\Jeff\MyDocuments\HelloWorld\HelloWorld.cs"
      I was just wondering where is my mistake? I also have tried "My Documents" and it gave me the same results.

      Thanks in advance

    • User profile image
      Ernesto​Iafrate

      I have Visual Studio 2013 and Windows 8.1 and after naming my Hello World! Project I am not getting an option to choose console.  Can you please help?

    • User profile image
      Phil

      I´m in the same situation like Ernestolafrate.

      In Visual Studio Express 2013 I can´t find the template for console in C#.

    • User profile image
      gduncan411

      @ErnestoIafrate:@Phil: There's a couple versions of Visual Studio Express. For this, you'll want Visual Studio Express for Windows Desktop.

      Don't worry about the other one you already have installed, you can have these both installed, side-by-side (in short, don't worry about uninstalling the one).

      Hope this helps

    • User profile image
      Ernesto​Iafrate

      , gduncan411 wrote

      @ErnestoIafrate:@Phil: There's a couple versions of Visual Studio Express. For this, you'll want Visual Studio Express for Windows Desktop.

      Don't worry about the other one you already have installed, you can have these both installed, side-by-side (in short, don't worry about uninstalling the one).

      Hope this helps

      Thank you so much you are a life saver!

    • User profile image
      PhilBel

      , gduncan411 wrote

      @ErnestoIafrate:@Phil: There's a couple versions of Visual Studio Express. For this, you'll want Visual Studio Express for Windows Desktop.

      Don't worry about the other one you already have installed, you can have these both installed, side-by-side (in short, don't worry about uninstalling the one).

      Hope this helps

       

      You are right, I installed the version for "Windows" and not for "Desktop".

       

      Thanks!

    • User profile image
      umar

      hi bob i readed c language but its different than urs for example i am going to make a program that will display "hello world"


      #include<stdio.h>
      #include<conio.h>
      void main(void) {
      printf(HELLO WORLD);
      getch();
      }
      for compile press:alt+f9 and to run the program press "ctrl+f9 we need turbo c or any other compiler to compile the program. i wanna know can we make window software by using this method???????



      }

    • User profile image
      dan2ronquil​lo

      hi I'm following through your HelloWorld via note pad and towards the end found this error CS103: the name 'SystemConsole' does not exist in the current context. And the new HelloWorld file as an application did not appear as a new folder . how will I correct this. this is the best tutorial I've ever follow through thanks…… DAN

    • User profile image
      dan2ronquil​lo

      Hi Bob,
      Thank you very much for this video and finally I found something that really would walk me through the process of learning some new stuff on a beginner level. I am a math/ economics teacher who's switching career into web development. And you are a God sent to me. Thank you very much I am looking forward to other videos of yours and may God bless you in your mission to help others.
      PS.
      Please disregard my previous comment I resolve the problem myself of course with your encouragement.
      Thank you very much!

      DAN

    • User profile image
      Seppe

      Hi,
      I've a little problem: when I try to run my code it says that the namespace 'HelloWorld' already contains a definition for 'Program'. I have typed the complete code over without any mistakes but it keeps saying that error. I dont know how to continue. Can someone help me please?

      ps: I'm using visual studio express 2013 for windows

    Conversation locked

    This conversation has been locked by the site admins. No new comments can be made.