In this course, C# 6 from Scratch, you will be introduced to the basics of C# 6, the latest version of one of the most popular programming languages on the planet, and work your way up through intermediate and advanced topics. Along the way you'll learn a good bit about best practices and how to create solid C# programs. Some of the major topics that you will cover include, basic programming constructs, classes and objects, events, LINQ, and much more. By the end of this course, you will have a solid foundation in all of C# and be ready to go on to more advanced topics. You need no prior programming experience for this course, and can use free software from Microsoft to follow along.
Course Overview Hi, this is Jesse Liberty, and welcome to my course, C# 6 From Scratch. I'm proud to be a Microsoft and a Xamarin MVP, and I've written a few books on C#. I'm very excited to bring C# to new programmers. C# is one of the most popular languages in the world, and with good reason. It offers tremendous power and flexibility, while protecting you from many of the pitfalls of other languages. C# 6 is the latest release, and it's full of great features. In this course we're going to start at the very beginning and work our way up through intermediate and even advanced topics. Along the way you'll learn a good bit about best practices and how to create solid C# programs. Some of the major topics we'll cover include basic programming and constructs, classes and objects, events, LINQ, and much more. By the end of this course, you'll have a solid foundation in all of C# and be ready to go on to more advanced topics. You need no prior programming experience for this course, and you can use free software from Microsoft to follow along. I hope you'll join me on this journey to learn programming with the C# 6 From Scratch course at Pluralsight.
Getting Started with C# Programming: Fundamentals Hi, this is Jesse Liberty from jesseliberty. com, and this module is Getting Started with C# Programming. One of the key concepts in programming in C# is the idea of a variable. A variable, essentially, holds a value. Variables always have a type, for example, integer. They also always have what we call an identifier, or a name, such as myAge. Variables also hold a value, and that value may change while the program runs, which is why we call it variable. An example of a variable is int, that's the type, myAge, that's the identifier, and 39, that's the value. Let's take a look at a demo.
Bending Time with Asynchronous C# Hi, this is Jesse Liberty from jesseliberty. com, and this module is Bending Time with Asynchronous C#. In this module, we're going to talk about how programs can be split up into "threads", and each of those threads can be run at the same time. Threads are used to have more than one thing happening at a time, and the main thread is typically a user interface thread. Without the ability to do asynchronous programming, if we had a long operation it could freeze the main thread, but with asynchronous programming, the long thread can continue, while the main thread is unaffected. The keyword await is used to say don't proceed until this line finishes, and then continue. If you use await, you must use the keyword async. Let's take a look at how you might use await. Here we have a method, Work. Notice the keyword async, and we're able to say await the running of the SlowTask. If there were any lines of code after the await, they would not be executed until SlowTask completed, and SlowTask could be virtually anything. Here, for demonstration purposes we are going to do 50000 square roots of a value. Let's take a look at a demo of using async and await to create asynchronous programming.
Introducing the Power of LINQ Hi, this is Jesse Liberty from jesseliberty. com, and this module is Introducing the Power of LINQ. LINQ stands for Language Integrated Query, and is a powerful feature of C# 6. We begin with a discussion of lambda expressions, which are used throughout LINQ. On the left, you see a method, Multiply, that takes two integer parameters and returns their product. On the right is a lambda expression, which is a much more concise way of saying the same thing. On the left part of the lambda expression are the two parameters x and y, and their type is inferred by the compiler. In the middle, you see the lambda operator, and on the right you see the (x * y), and the keyword return is implied as well. Let's take a look at a demo that will clarify the use of lambda expressions.