Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Creating Your First C# Program - 02

Download

Right click “Save as…”

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:

Follow the Discussion

  • Awsome Angel

  • JaneJane

    Thanks!

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

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

    i only see funny char.

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

  • 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.

  • JustinJustin

    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.

  • IbaIba

    Very clean and awesome

  • Awesome!!

  • @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!

  • Paul GichPaul Gich

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

  • Paul GichPaul Gich

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

  • Rituraj JainRituraj 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

  • HEROLDHEROLD

    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

  • Naqi AghaNaqi 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!!

  • @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.

  • @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.)

  • 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

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

  • RDLRDL

    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.

  • Jhumir BenedictoJhumir Benedicto

    Thanks i learn lot.

  • @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!

  • AlanAlan

    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.

  • @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.

  • Mamoun SaeedMamoun Saeed

    Great videos

  • abid aliabid ali

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

  • AleksanderAleksander

    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.

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

  • Bakeca RomaBakeca Roma

    Great videos.Thanks

  • JoeJoe

    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.

  • YoungYoung

    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!

  • stevesteve

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

  • @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.

  • SteveSteve

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

  • Thennarasanthens #(: Known is a Drop, UnKnown is an Ocean :)#

    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

  • @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!!!

  • SteveSteve

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

  • Thennarasanthens #(: Known is a Drop, UnKnown is an Ocean :)#

    @BobTabor:Thanks Bob Smiley

    @Steve: Welcome steve, Happy Learning & Coding Smiley

  • Reynaldo GuizaReynaldo 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

  • AmnonAmnon

    Amazing videos.Thanks

  • @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!!!

  • StephenStephen

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

  • StephenStephen

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

  • Nadeem AkhtarNadeem 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

  • ValentineValentine

    Thx you:)

  • Muhammad Waqas AkramMuhammad 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

  • SteveSteve

    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

  • @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!

  • adityaaditya

    good resources i hav ever seen....

  • WALEWALE

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

  • 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

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

  • MohitMohit

    Thanx Bob sir for awesome videos....

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

  • Thank you Bob for these Video! I love it!

  • NeoNeo

    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!

  • NeoNeo

    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.

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

  • RamyaRamya

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

  • DawcDawc

    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. ^_^

  • Ian NunesIan 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!

  • james gainjames 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....

  • viraj parikhviraj parikh

    thanks alot bob ...

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

  • ardaarda

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

  • gamerman831gamerman831

    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!

  • RasikaRasika

    thanks Bob :)

  • muyiwapaulmuyiwapaul

    challenging

  • washerguy1washerguy1

    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

  • 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.

  • LeciaLecia

    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!!

  • LeciaLecia

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

    :)

  • Sen CanSen Can

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

  • jhanakjhanak

    thank you sir , this is best video .

  • SenCanSenCan

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

  • Rocco PietrofesaRocco 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?

  • Dragos LucaLD 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.

  • rommel Bojorgerbojorgee rbojorge

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

  • taruntarun

    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

  • taruntarun

    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

  • MarcelMarcel

    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

  • MarcelMarcel

    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

  • MarcelMarcel

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

    Sorry. :)

  • MarcelMarcel

    Could anybody please help me with the cmd error?

    Thnx.

    Marcel

  • MarcelMarcel

    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.

  • MarcelMarcel

    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

  • Greg Duncangduncan411 It's amazing what a professional photographer can do...

    @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

  • @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

  • Greg Duncangduncan411 It's amazing what a professional photographer can do...

    @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

  • 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.
  • This tutorial is freaking awesome! Thanks heaps Bob...Cheers Smiley

  • Hoang GiangHoang 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

  • xuyxuy

    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).

  • 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

  • ALex617ALex617 C# 4.0 Noob

    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.

  • Sangeeth SudheerBlueEzio Just another Geek. ;)

    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

  • Muqtasid MMuqtasid 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?

  • Muqtasid MMuqtasid M

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

  • 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

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

  • ericCodesericCodes USC Computer Science Student

    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.

  • Clint RutkasClint I'm a "developer"

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

  • Clint RutkasClint I'm a "developer"

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

  • Clint RutkasClint I'm a "developer"

    @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. 

  • SteffenSteffen

    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

  • SteffenSteffen

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

  • Awesome Video! Great explanation!

  • Clint RutkasClint I'm a "developer"

    @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?

  • KonradenKonraden

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

  • AKSHAY GUPTAAKSHAY GUPTA

    Excellent..

  • Andy SloanAndy Sloan

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

  • 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?

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

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

  • Clint RutkasClint I'm a "developer"

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

  • leelee

    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?

  • Clint RutkasClint I'm a "developer"
    @lee: casing matters in c#. WriteLine is what you want.
  • ginksiginksi

    error cs0103 when compiling

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

    system.console.ReadLine();
    }
    }

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

  • Clint RutkasClint I'm a "developer"

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

  • 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

  • Clint RutkasClint I'm a "developer"

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

  • VictorVictor

    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.

  • Clint RutkasClint I'm a "developer"

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

  • UnbuiltUnbuilt

    Can someone help i am getting an error it just says

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

  • Very nice. Started today. Smiley

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

  • Duncan MackenzieDuncanma "yeah that's awful close, but that's not why I'm so hard done by"

    @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)

  • stephanie hallbergstephanie hallberg

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

  • 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

  • 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();
         }
    }

  • 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

  • ChadvezChadvez

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

  • SUDARSANSUDARSAN

    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

  • adaradar

    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?

  • Great tutorial!

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

    Thank you.

  • cmgxcmgx

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

    This was a great tutorial, thank you!

  • JordanJordan

    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?

  • Nice ~ Having English Caption can be better!

  • 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!

  • ApexApex

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

  • ghadeerghadeer

    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 ?

  • BrianBrian

    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.

  • JeffJeff

    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

  • 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?

Remove this comment

Remove this thread

close

Comment on the Post

Already have a Channel 9 account? Please sign in