Join Gerry O'Brien for an in-depth discussion in this video Installing C#, part of Up and Running with C#.
- View Offline
Now that we've had a brief introduction to the history of C Sharp, let's talk about how we can install the language so that we can use it on the computer. C Sharp by itself is the language, and in order to use it, you'll need to have at least the components available for the language in the compiler. Now, you can feel free to use Notepad if you wish. Simply type your code into Notepad. As you can see, we've got a few lines of code typed into Notepad here, and when you're finished with typing in, you would save it with a .cs extension, and then you could step out to a command prompt and run the C Sharp compiler with all of the various options to actually get your code to compile, and then make your application able to run.
As long as the .Net framework is installed on the computer, the application will run perfectly fine. However, it is highly recommended that you use Visual Studio for your C Sharp coding. And the reason I mention Visual Studio is because it has many, many productivity enhancements within the tool that make your C Sharp coding much easier. Things like IntelliSense and code checking make things much easier when writing your C Sharp applications. Here we're on the Visual Studio downloads page. You can find this by going to www.visualstudio.com, and downloads.
What we basically see here on the page are some trial editions, so you can download Visual Studio 2013 90 day free trials. And there are various options available such as Ultimate, Premium, Professional and Test Professional, but you can also download for free, and use as long as you need them, the Visual Studio Express editions. We'll demonstrate the code throughout this course using the Visual Studio Express editions. Notice that there are also various editions available here.
Express 2013 for Web provides all of the core tools that you’ll need to create compelling web applications and web services, running on your own platform, or if you choose, running on the Microsoft Azure platform. Visual Studio Express 2013 for Windows, provides all of the tools that you'll need to build what we now refer to as Windows Store Apps. These are the apps that you'll find running in their native full-screen mode 0n Windows 8 and Windows 8.1 tablets and desktop PCs.
Visual Studio Express for Windows Desktop, allows you to create desktop applications, similar to the ones that you might be familiar with already. These applications are created using technology such as Windows Forms, the Win-32 application programming interface that has been prevalent in all Windows applications for a long time. As well as using the WPF, or Windows Presentation Foundation application style as well. We'll use the Visual Studio Express for Windows Desktop through most of this course as we take a look at some of the C Sharp language features.
The remaining two are the Visual Studio Team Foundation Server Express with Update 2. You won't really need to concern yourself too much with Team Foundation Server at this point, because if you're just learning C Sharp, the chances of you building a Team Foundation Server for source code control, and all of these batch building functionality built into it, is fairly slim. Most of the time, organizations will use this and you'll simply have a product that will plug into it. And finally, towards the end of the course, we'll take a look at Windows Phone applications.
And there's a Visual Studio Express edition that is intended for Windows Phone development. You may notice that currently, this one says Visual Studio Express 2012 for Windows Phone, expect the 2013 version to come out shortly. Any one of these applications can be installed by expanding the window, and finding the installation options below. On the installation options, clicking install now here will run the web installer installing the application from the internet onto your computer. You many also choose to download a DVD ISO image, where you can burn to disk, and install from a disk if that's your option that you choose.
Again, we have all of the different versions that we'll use throughout this course installed in this computer, and they are the Express editions. One final note before we leave, if you're a student, Visual Studio Professional 2013 is free for students. All you need to do is sign up at dreamspark.com, verify that you're a student, and you can download Visual Studio Professional and create paid applications without having to worry about your Express editions limiting you, or without worrying about a trial edition expiring on you.
Remember, the entry point for programming in C Sharp is low, because you can acquire these tools for free to create simple applications. The pay for versions of Visual Studio offer much more functionality, that is aimed at working in enterprise environments that are focused on team development and software testing, along with the general development task. You can create standard desktop apps, Windows Store apps, web apps, and Windows Phone apps with the right version of Visual Studio and the provided templates.
- Installing C#
- Working with loops
- Controlling program flow
- Using variables
- Building functions
- Creating and instantiating classes
- Catching errors
- Managing resources with the garbage collector
- Building collections