Learn C# Programming (in ten easy steps) [Version 2] is suitable for beginner programmers or anyone with experience in another programming language who needs to learn C# from the ground up. Step-by-step it explains how to write C# code to develop Windows applications using either the free Visual Studio Community Edition or a commercial edition of Microsoft Visual Studio. This is the completely revised and updated second version of this course.
C# is one of the most widely used an important of all modern programming languages. If you need to learn C# quickly and painlessly, this is the perfect course.
Learn C# Programming (in ten easy steps) [Version 2] is suitable for beginner programmers or anyone with experience in another programming language who needs to learn C# from the ground up. Step-by-step it explains how to write C# code to develop Windows applications using either the free Visual Studio Community Edition or a commercial edition of Microsoft Visual Studio. This is the completely revised and updated second version of this course.
C# is one of the most widely used an important of all modern programming languages. If you need to learn C# quickly and painlessly, this is the perfect course.
You will begin by learning the core features of programming – variables, constants, functions and data types. You will move on rapidly to learn about Object Orientation and the more advanced features of C# and the .NET framework such as file-handling, data-streaming, dealing with exceptions (errors) and overriding methods. Even if you start out as a complete beginner, by the end of this course you will have built a really solid foundation of programming knowledge and skills.
All the source code of sample projects is provided ready for you to download, run and modify. The course also includes an eBook that provides even more information on the topics being discussed. And there are also interactive quizzes to test your understanding of each major topic.
The course instructor, Huw Collingbourne, is Director of Technology with SapphireSteel Software, a company that specialises in Visual Studio development tools (written in C#) for professional programmers.
Learn C# Programming (in ten easy steps) is the fastest and simplest way to help you make the move from coding novice to professional programmer. The first version of this course was launched in 2012. The current version has been completely re-made and expanded with numerous new lessons.
As an added bonus, the complete version 1 of the course (almost 4 additional hours of video instruction) is also included as a free download.
There is also an extra bonus project (a drag-and-drop application launchpad) that will help you extend your skills while programming a genuinely useful application.
This course will teach you how to program the C# language on Microsoft Windows. This video gives you a quick overview of what to expect from the course.
This is the course text to download.
This document contains links to useful downloads, sources of information and news of developments related to C# programming.
A summary of section One of this course
If you are a Visual Studio 2019 user, be sure to download and read this document before creating a project.
If you are impatient to get started, this video will guide you through all the steps from starting Visual Studio to running your program. Follow along to see how to design a user interface and write some simple C# code.
How to create a user interface with Visual Studio
How to add code to respond to events
What you need to do to use the code in the archive
This video explains some of the differences between editions of Visual Studio. It also explains how to customize the software by changing everything from the items on the menus to the formatting of your code.
Familiarize yourself with the essential features of the Visual Studio environment such as the Design View, Code Editor, Properties and Events panels, Alignment Toolbar and Solution Explorer.
You can follow this course on a Mac (or on Linux) using the free MonoDevelop IDE and Mono framework. Alternatively, you can run Visual Studio in a Virtual Machine, such as Parallels, on a Mac.
Web links:
http://www.parallels.com/
http://monodevelop.com
This lecture explains how to load and run the Visual Studio solutions provided in the source code archive into MonoDevelop (or Xamarin Studio) on a Mac.
This is where I explain the essential features of the C# language: data types, variables, constants, functions, keywords, namespaces, type conversion and other important components of the language
Every piece the data in your programs has data type. That’s what this lesson is all about.
Here we look at how to assign data items to named variables.
While variables – whose values can be changed - are essential in programming, sometimes you may want to make sure that a value cannot be changed.
How to document your code.
C# defines a number of special words, keywords, that mean specific things to the language.
A function is a named block of code that can be run by calling its name.
How to use code stored in other files.
How to use some of the built-in routines to convert between data types.
As well as using methods to convert between different types, you can ‘cast’ one type to another – with some restrictions.
C# also allows you to declare and initialize local variables without specifying a type
Let’s now summarise some of the essential elements and syntax of C#.
How to program a simple calculator.
How to assign values to variables and constants
How to run code only if some test condition is true.
How to run different bits of code when you test if something is or is not true.
How to run just one line of code after a test. And do curly brackets matter?
How to make a second test if the first one fails.
If you need to perform a number of tests, it is often quicker to write them as ‘switch statements’.
Operators are special symbols that are used to do specific operations such as add¬ition, multiplication and concatenation.
The operators you need to do calculations in C#.
How to compare two values.
How to test If X is true AND Y is true. Or if either X OR Y is true.
Operators that do arithmetic and assignment in one go.
The ++ and – operators.
What is the difference between ++a and a++?
How to handle the order in which tests are evaluated.
Multiple test conditions: good, bad or incomprehensible?
Let’s summarise what we’ve learnt about operators.
In this step I’m going to explain all about functions or methods and arguments
Here we look at functions: named blocks of code.
Is a method the same as a function?
How to send data items to a function.
How to return data from a function.
The different types of argument that you can use in C#.
And one more argument type.
Multiple functions with the same name. How does that work?
Functions inside functions…
A sample program showing some of the concepts we’ve discussed
Download this PDF guide to learn more about the details of the TreeView sample project described in the previous lesson.
Functions that call themselves.
Let’s quickly revise what you’ve learnt in this step of the course.
How to divide code into named blocks
This is where things start to get really interesting. Object Orientation.
What are classes and objects?
Create a blueprint for an object.
Create an object based on the class defined in the last lesson
How to be sure an object has been created
The Visual Studio refactoring tool
This is a hands-on guide to writing code to create a simple ‘family tree’ of related classes.
Visual Studio can automate the separation of classes into code files
Methods that create an object from a class
Keywords that change scope and visibility
Special types of method that access fields of an object
Does it matter what your call the things in your programs?
Let’s quickly go over what we’ve learnt in this section.
How to create and use objects
In this step we look at arrays, indexing and iteration.
Arrays – sequential collections of elements
How to count over list items in a loop
You can create arrays of any type of object, strings, integers, doubles or even user-defined objects
Another common way of iterating over items in an array in C# is to use a foreach loop.
Strings can be treated as arrays of characters
Using ‘while’ loops to program a word counting utility
An alternative type of ‘while’ loop
A simple text editor that you can use as a basis for adding features such as our word counter tool
Strings in C# can be manipulated using built-in methods
There is another string-like class called StringBuilder that you need to be aware of
How to embed values into a format string
C# also lets you evaluate expressions right inside a string
A quick overview of what we learnt about arrays and strings in this section
Sequential lists of characters and other data types
In step 7 we find out how to save and load files to and from a disk.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.