2 out of 5
2
2 reviews on Udemy

Practical Guide to C# 7 Programming, TDD and Best Practices

Boost your skills to advanced level with C# 7 with pattern matching, LINQ, regex, indexers, and more
Instructor:
Packt Publishing
18 students enrolled
English [Auto-generated]
Understand and set up the .NET environment
Define variables, syntax, control flows, statements, and arrays through examples
Get acquainted with attributes, collection, generics, and LINQ
Learn to test your code using unit tests and unit test frameworks & add test support to your project
Explore the essentials of TDD
Understand why SOLID principles are important for testing & what mocking is & how to use mocking frameworks
Discover the new pattern matching features and what you can do with switch case statements
Build local functions inside functions. Yes, those local functions can be recursive too
Explore what variables can do for you and how they clean up your code

C# is a multi-paradigm programming language providing a host of new features to build powerful cross-platform applications. Using TDD along with C#  has proven itself to be one of the best practices out there when it comes to writing maintainable, robust, and testable code.

This course takes a practical and incremental approach. It helps you gain basic fundamentals using real-world practical examples and gets you acquainted with C# programming. Next, you’ll explore the concepts of Object-Oriented Programming (OOP) through a real-world example & dive into advanced-level concepts such as generics and collections, and you’ll get acquainted with objects and LINQ. Then you’ll learn to write & automate tests for your implementations & also explore how to add full test support to our projects, as well. Finally, you will learn some exciting tips, tricks, & techniques for your C# 7.x coding & will able to build your own desktop applications in C# 7.x much faster and with ease.

By the end of this course, you will have the tools you need to start building applications, backed by an automated suite of tests to ensure quality software delivery and best practices to enhance your coding skills effectively.

Contents and Overview

This training program includes 2 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, Learn C# in 7 days begins by teaching you the basic fundamentals using real-world practical examples and gets you acquainted with C# programming. We cover some important features and nuances of the language in a hands-on way, helping you grasp the concepts in a fluid manner. Later, you’ll explore the concepts of Object-Oriented Programming (OOP) through a real-world example. Then we dive into advanced-level concepts such as generics and collections, and you’ll get acquainted with objects and LINQ. Toward the end, you’ll build an application that covers all the concepts explained in this video course. By the end of this course, you’ll have next-level skills and a good knowledge of the fundamentals of C#.

The second course, Introducing Test Driven Development in C# covers key concepts, methods, and patterns behind TDD through concrete and practical examples in C# 7. This course starts off with an introduction to unit tests and unit test frameworks. Basically, you will learn how to write and automate tests for your implementations. After that, we shift the paradigm and see how to write your tests before implementation itself. We explore how to add full test support to our projects, as well. Through practical examples, you will witness how this technique helps us write higher-quality code. In the final sections of this course, you will learn proven methods and patterns for writing modular and testable code. The principles of TDD will help you write better and cleaner code. In addition, you’ll see how solid tests give you a new sense of confidence when you need to modify existing code, refactor, and add new features.
By the end of this course, you will have the tools you need to start building bulletproof applications, backed by an automated suite of tests to ensure quality software delivery.

The third course, C# 7.x Tips, Tricks, and Techniques will teach you to implement practical and proven techniques to improve particular aspects of C# 7.x development. Each section covers tips and techniques with explicit instructions to carry out different C# 7.x tasks in a practical manner. The techniques are demonstrated using small practical examples. You will boost your skills with information on enhancing your coding style and performance, and learn about C# 7.x processes and code quality. This course focuses on discovering new possibilities with C# 7.x, that can enhance your current skill set. By the end of this course, you will have learned some exciting tips, best practices, and techniques for your C# 7.x coding. You will be able to build your own desktop applications in C# 7.x much faster and with ease.

About the Authors:     

Gaurav Aroraa has done an M.Phil in computer science. He is a Microsoft MVP, a lifetime member of Computer Society of India (CSI), and is certified as a Scrum trainer/coach, XEN for ITIL-F and APMG for PRINCE-F and PRINCE-P. Gaurav serves as a mentor at Indian mentor, an open source developer, and a contributor to TechNet Wiki co-founder of Innatus Curo Software LLC. In 19+ years of his career, he has mentored thousands of students and industry professionals. 

Nikola Živković is a software developer with over seven years’ experience in the industry. He earned his Master’s degree in Computer Engineering from the University of Novi Sad in 2011, but by then he was already working for several companies. At the moment he works at Vega IT Sourcing from Novi Sad. He has worked on large enterprise systems as well as on small web projects. Also, he frequently talks at meetups and conferences and he is a guest lecturer at the University of Novi Sad.

Simon Hughes has been designing, developing software for 30 years in the UK. Simon is currently the lead developer at bybox where he spends his time creating state of the art wireless warehouse systems. He spent a few years teaching the MSDN courses for Cap Gemini Training. He is also a pluralsight author. Simon dove into the world of mathematics and created a quantitative risk analysis and explosion modeling software for a leading oil company, and was part of the team who created the Crest settlement bank system. Simon was also the lead developer on the team that wrote the highly scalable multi-threaded arrival and departure screens in many leading airports. He specializes in professional application development using Microsoft technologies, including C#, SQL Server and .NET. Author of the popular EntityFramework Reverse POCO Generator available at ReversePoco. In his spare time, he loves to do archery and photography.

Learn C# in 7 days

1
The Course Overview

This video gives an overview of the entire course.

2
Basics of .NET Programming

In this video, we will get a brief introduction on programming. We will also see .NET and .NET core .NET core features is another section of this video.

  • Understand .NET and .NET core

  • Study the .NET core features

3
Setting Up the Environment

The .NET Standard is a set of APIs that resolves the problems of code sharing while you’re trying to write cross-platform applications. We will also see the IDEs and Editors for C#. In this video, we will see how to initiate the installation of Visual Studio 2017 on Windows 10.

  • Understand .NET standard

  • See the available IDEs and Editors in C#

  • Install Visual Studio 2017

4
Understanding a Typical C# Program

In this video, we will learn to create a console application on visual studio.

  • Create a day 02 project

5
Deep-Dive into Application Using Visual Studio

In this video, we will deep-dive to get more insight on using the visual studio.

  • Generate the NuGet package according to our options

  • Demonstrate all color combinations

  • Generate system sound through the console speaker

6
Identifiers

In this video, we will learn about the different types of keywords with examples

  • Create a variable of object program

7
Contextual and Types

In this video, we will discuss about the functions of contextual keyword. Also, we will discuss about four important types.

  • Create an object type using boxing and unboxing functions

8
Operators

In this video, we will discuss about different types of operators.

  • Implement all operators

9
Declarative, Expression, and Selection Statement

This video will give us a clear knowledge about declarative statement, expression statement and selection statement. We will also see different types of selection statement such as if..else and switch case.

  • Implement vowel problem using if statement, if..else and nested if..else statement

  • Use switch statement for implementing vowel problem

10
Iteration Statement

Iteration statement provide a way to iterate collection data. In this video, we will look at different iteration statement such as do..while loop, while loop, for loop and foreach loop.

  • Use different types of iteration statement in our code

11
The Jump Statement

The jump statement is a statement that helps move control from one section to another. In this video, we will see different types of jump statement such as break, continue and default.

  • Look at the examples of jump statement

12
Arrays

An array is nothing but a data structure that stores fixed-size sequential elements of the same type. In this video, we will see types of array such as single-dimensional array, multi-dimensional array and jagged array.

  • Understand the different types of array with example

13
Strings

String is nothing but an array of characters that represents UTF-16 code units and is used to represent a text. In this video, we will also go through structure versus class.

  • Look at the string example

  • Study structure versus class

14
Tuples

Tuples are there at whatever point a particular case needs to return multiple values from a method.

  • Study tuple with example

15
Local Functions

Local functions can be achievable using function and action using anonymous methods. These functions are very powerful and have the same capability as any other normal function. In this video, we will look at literal improvement, binary literals and digits separator. We will also discuss Async and restrictions using new signature.

  • Implement local function code example

  • Study Async main and restrictions while using new signature

16
Default Expressions

With the introduction of Default literal, the expression can be implicitly converted to any type and produces result as default value of the type.

  • Study the implementation of new default literals

  • Implement infer tuple names

17
Modifiers

Modifiers are nothing but special keywords in C# that are used to declare how a specific method, property, or variable could be accessible. We will also see access modifiers and accessibility levels. This video will take us to different types of modifiers as well.

  • Understand different types of modifiers with a code example

18
Abstract and Static

An abstract modifier indicates that things are yet to be completed. We will also see the rules of abstract modifier and static modifier. We will also see different types of static modifier.

  • Study the rules of abstract modifier

  • Study the rules for the static modifier

19
Methods and Properties

A block of statements that have the access modifier, name, return type, and parameters are method. We will also look into the usage of methods in C#. we will also see properties and its types.

  • Implement a code example to illustrate methods in C #

  • Study the types of properties

20
Indexers and File I/O

An indexer provides a way to access an object via an index like array. In this video, we will look at File I/O which is a collection of data that stores physically in a directory of the system.

  • Look at the indexer example

  • Implement the file stream example

21
Exceptional Handling

Exception is a kind of error that comes when methods do not work as expected or are not able to handle the situation as intended. In the video, we will use the try..catch..finally block to explain exception handling.

  • Implement the try..catch..finally block

  • Implement the user-defined exceptions

22
Discussing a Regular Expression and Its Importance

A regular expression or pattern matching is nothing but a way in which we can check whether an input string is correct or not. In this video, we will see the importance of regular expression.

  • Study regular expression with code example

23
What Is Reflection?

Reflection is a way to get inside of a program, gathering the object information of a program/code and invoking these at runtime. In this video, we will understand the reflection concept with an example.

  • Implement reflection using a code example

  • Study important extension methods

24
Delegates

Delegates are a similar concept to pointers to functions, as in C and C++. A delegate is nothing but a variable of a reference type, which holds a reference of a method, and this method is triggered.

  • Understand declaring a delegate type

  • Implement delegates

25
Events

Events are nothing but user actions or action for the user. In this video, we will also see how to declare an event in C#.

  • Implement event declaration

26
ArrayList

This video introduces ArrayList and declaration of ArrayList. It will also explain properties and methods in ArrayList.

  • Study the properties and methods in ArrayList

  • Implement an example of ArrayList

27
HashTable

In this video, we will study HashTable and declaration of HashTable. It brushes up with the properties and methods in HashTable.

  • Study the properties and methods in HashTable

  • Implement an example of HashTable

28
SortedList

This video introduces SortedList and declaration of SortedList. We will also see properties and methods in SortedList.

  • Study the properties and methods in SortedList

  • Implement a SortedList example

29
Stack

This video explain the concept of stack. It will also explains the properties and methods in Stack with example.

  • Understand properties and methods in Stack

  • Implement stack example

30
Queue

In this video, we will explain the concept of queue. We will also see properties and methods in Queue with example.

  • Understand properties and methods in Queue

  • Implement queue example

31
Understanding Collection Classes and Their Usage

In this video, we will discuss all about collections and generics with the use of code examples.

  • Overview of the usage and meaning of non-generic collection classes

32
Understanding Generics and Their usage

In this video, we will create or write code for a class that is meant to accept different data types for which it is written.

  • Create a generic list to a strongly typed list

  • Use fixed-size arrays for strongly typed list objects

33
Discussing Constraints

In this video, we will use generic constraints to restrict our use to a few data types or only a specific data type.

  • Restrict our class to not accept any types other than reference types

34
Types of Attributes

In this video, we will discuss the various types of attributes in detail.

  • Create and implement a custom attribute

  • Beautify code using attributes

35
Leveraging Preprocessor Directives

As is clear from the name, preprocessor directives are the processes undertaken before the actual compilation starts. In other words, these preprocessors give instructions to the compiler to preprocess the information, and this works before the compiler compiles the code.

  • Preprocessor directives in action

  • Define two variables for two different compilation environments

36
Getting Started with LINQ

In this video, we will see a simple example to query data.

  • Write unsafe code

  • Write asynchronous code

37
Inheritance

OOP is one of the programming paradigms that is purely based on objects. These objects contain data. In this video, we will see different types of relationships in object-oriented programming. Inheritance is one of the most important features/concepts of OOP.

  • Study the different types of relationship

  • Understand the inheritance concept

38
Member Visibility in Inheritance

In this video, we will briefly explain member visibility in inheritance. We will also see different accessibility modifier.

  • Study the different accessibility modifiers

39
Implementing Inheritance

This video will show inheritance and multiple inheritance implementation in C#.

  • Implement the inheritance example

  • Implement multiple inheritance

40
Abstraction

Abstraction is the process where relevant data is shown by hiding irrelevant or unnecessary information. In this video, we will see abstract class as well as its features. This video major part speaks about interface and features of interface.

  • Study the features of abstract class

  • Implement abstraction using abstraction class

41
Encapsulation

Encapsulation is a process where data is not directly accessible to user.in this video, we will see the access modifier in details.

  • Implement encapsulation

42
Polymorphism

Polymorphism means having many forms. In this video we will see the types of polymorphism and its implementation.

  • Implement the types of polymorphism

43
Test Your Knowledge

Introducing Test Driven Development in C#

1
The Course Overview

This video gives an overview of the entire course.

2
Exploring Test Automation

The aim of the video is to understand the shortcomings of manual testing and how test automation is beneficial.

  • Understand the problems of manual testing

  • Explore the benefits of test automation

  • Understand who writes the test

3
Types of Automation Tests

The aim of the video is to learn the various types of Automation tests.

  • Learn what are unit test

  • Learn what are integration test

  • Learn what are functional test

4
Implementing Automation Frameworks in .NET

In this video, we will learn how we can implement automation framework in .NET using unit test frameworks.

  • Understand what are unit test frameworks and how they help in automation testing

  • Learn how to run use case for MSTest Unit framework

  • Learn how to run use case for NUnit framework

5
Automated Testing Demonstration with an Example

We have learnt unit test frameworks in previous video. In this video, we can use the knowledge to understand a practical example of automated unit test.

  • Explore a practical example to demonstrate automated testing

6
Understand TDD with an Example

In this video, we will have our first contact with TDD with a practical example.

  • Understand what is TDD

  • Explore a practical example to understand TDD

7
TDD Versus Traditional Testing

In this video, we will compare TDD with traditional testing that is, writing only unit test for the code.

  • Understand the difference between TDD and traditional testing

  • Understand the similarities between TDD and traditional testing

8
Development Cycle of TDD

The aim of the video is to dive deeper to understand the TDD development cycle.

  • Learn what are the 3 steps of TDD

  • Explore refactoring

  • Understand what is TDD mantra

9
Creating the Test Project in Visual Studio

The aim of the video is to understand how to create a Test project in Visual Studio and explore few tips and tricks.

  • Create Test project in Visual Studio

  • Install xUnit test framework

  • Run some simple tests

10
Creating the Test Project in Visual Studio Code

The aim of the video is to understand how to create a Test project in Visual Studio Code.

  • Create Test project in Visual Studio Code using .NET Core CLI

  • Install xUnit test framework

  • Run some sample tests

11
Using Patterns for Arranging and Formatting Code

In this video, we will explore various test arranging patterns and naming conventions.

  • Understand what is AAA patterns

  • Learn the naming conventions for unit test methods

12
Dive into Continuous Testing and Code Coverage

The aim of the video is to explore code coverage and how it can be checked using Visual Studio tools and ReSharper.

  • Understand what is code coverage and why is it used for

  • Check code coverage using Visual Studio tools

  • Check code coverage using ReSharper

13
Testable Code and Single Responsibility Principle

Goal of this video is to display why single responsibility principle is the backbone of well-designed code.

  • Discuss the best practices while writing testable code

  • Explore single responsibility principle

14
Anti-Pattern – Singleton Pattern

The aim of the video is to explore the implementation of singleton pattern, its shortcomings, and the solution for it.

  • Understand what is singleton pattern and examine one practical implementation

  • Understand the problem of its implementation

  • Discuss how the problem in the implementation can be solved

15
Anti-Pattern – The new Operator

The aim of the video is to explore the shortcomings of using the new operator.

  • Understand what is new operator and examine one practical implementation

  • Understand the problem of its implementation

  • Discuss how the problem in the implementation can be solved

16
Anti-Pattern – Static Methods

The aim of the video is to explore the shortcomings of using static methods.

  • Understand what is new operator and examine one practical implementation

  • Understand the problem of its implementation

  • Discuss how the problem in the implementation can be solved

17
Introduction to Mocking

In this video, we explore what is mocking and how to use mocking objects in tests.

  • Understand what is mocking

  • Understand what are mocking objects and their types

  • Learn mock objects and their benefits

18
Manually Mocking Interfaces

In this video, you will learn how to create mocking objects manually and how to use them in your tests.

  • Implement equipment service using TDD

  • Learn how to create mock objects manually

19
Using Moq Framework

In this video, we will learn how to implement mock objects using Moq framework.

  • Understand what are mocking frameworks

  • Install Moq

  • Create and setup mock objects using Moq

20
Dependency Inversion Principle and Inversion of Control

In this video, we will see what dependency inversion principle and inversion of control are.

  • Explore dependency inversion principle

  • Understand the concept of inversion of control

  • Understand the concept of inversion of control

21
Factory Method Design Pattern and Abstract Factory Design Pattern

In this video, we will learn some creational design patterns that can help us with our testing.

  • Understand what is factory method design pattern

  • Implement factory method design pattern

  • Understand what is abstract factory design pattern

  • Implement abstract factory design pattern

22
Using Delegate Types

The aim of the video is to explain what functional delegates are and how we can use them.

  • Explore Action Delegate type

  • Explore Func Delegate type

23
Dependency Injection

The aim of the video is to explore dependency injection with an example.

  • Understand the purpose of using dependency injection

  • Learn dependency injection with an example

24
Dependency Injection Patterns

In this video, we will learn more about four dependency injection patterns.

  • Examine construction injection

  • Examine property injection

  • Examine method injection

  • Examine ambient context

25
Dependency Injection Containers

The aim of the video is to understand what dependency injection containers are and will explore the various dependency injection containers available in the market.

  • Explore dependency injection containers

  • Use Castle Windsor dependency injection container

  • Use Autofac dependency injection container

  • Use StructureMap dependency injection container

26
Composition Root

The aim of the video is to understand the best practices when it comes to using dependency injection containers.

  • Understand the proper way of using dependency injection container

  • Explore composition root

  • Learn RRR pattern

27
Repository Pattern Introduction

The aim of this video is to cover theoretical knowledge of repository pattern.

  • Define repository pattern

  • See the benefits of repository pattern

  • Define unit of work

  • Introduce entity framework

28
Repository Pattern Implementation

In this video, we will see an implementation of repository pattern using entity framework.

  • Explain the Blog example

  • Implement the Blog example

29
Service Layer

In this video, service layer is explained.

  • Explore service layer pattern

  • Compare the repository pattern and unit of work with service layer

30
Test Your Knowledge

C# 7.x Tips, Tricks, and Techniques

1
The Course Overview

This video will give you an overview about the course.

2
Static Using

Ordinarily, when you call a static member, you provide the type name along with the member name. Repeatedly entering the same type name to invoke members of the type can result in verbose, obscure code. The using static directive designates a type whose static members you can access without specifying a type name.

  • Learn about static using

  • Type more concise code

  • Write easier to read code

3
Practicing Out Variables

Existing syntax that supports out parameters has been improved. You can now declare the out variables within the argument list of a method call, which makes the code look cleaner.

  • Learn about out variables

  • Write cleaner looking code

  • Learn how to declare out variables within an argument list

4
Practicing Local Functions

Additional private methods keep each method small and focused. However, they can make it harder to understand a class when reading it the first time. Local Functions enable you to declare functions inside another function, making it easier to read and limits visibility.

  • Understand what a local function is

  • Learn how to write local functions

  • Make code easier to read and limit visibility

5
Using Literals

Long numbers are hard to read. Digit separators can be used within any numeric literal as a means of improving legibility.

  • Learn how to improve readability of long numbers

  • Observe how to improve legibility of binary numbers

  • Explore how to improve legibility of hexadecimal numbers

6
Return by Reference

Ref keyword has been enhanced and can now be used in two more useful situations like returning a reference value from a method, and creating a local variable to store a reference value.

  • Learn about the new enhancements to the ref keyword

  • Understand how to return a reference value from a method

  • Explain about creating local variables to store reference values

7
Exceptions as Expressions

Throw used to be a statement, not an expression, meaning there were places where you could not use it. The addition of expression-bodied members adds more locations where throw expressions would be useful.

  • Learn about using exceptions as expressions

  • Gain knowledge about where throw expressions would be useful

8
Expression-Bodied Syntax

C# 6 introduced expression-bodied members for member functions, and read-only properties. C# 7.0 expands the allowed members that can be implemented as expressions. You can implement this in constructors, finalizers, and get and set accessors on properties and indexers.

  • Understand expression bodied syntax

  • Learn about allowing members to be implemented as expressions

  • Explore where you can use expression bodied syntax

9
Techniques for Practicing Patterns

A very handy feature that C# 7.0 gives you is patterns. These provide a simple syntax to test whether an object meets a criteria related to its value or type. Practice and learn about different types of pattern matching.

  • Understanding constant patterns

  • Learn about type patterns

  • Understand the pitfalls and dangers of using var patterns

10
Practicing Switch Statements

Dive deeper into what you can do with the switch statement in C# 7.

  • Master using the when clause in your switch statements

  • Learn how to mix and match patterns

  • Understand about the first come first served pattern matching order

11
The Old Way of Using Tuples Prior to C# 7

Tuples existed prior to C# 7, and it’s important to know where it all started, and to understand how they worked before we see how they’ve changed in C# 7.

  • Gain knowledge of what a tuple is

  • Understand how tuples used to work prior to C# 7

  • Gain foundational knowledge about C# 6 tuples

12
The C# 7 Tuple Class

Learn about the new tuple enhancements in C# 7.0, different ways to use them, and guidance on working with tuples.

  • Learn about the new tuple enhancements in C# 7.0

  • Understand the different ways you can use them

13
Using Deconstruction for Tuples Types in C# 7

Learn about deconstructing tuples, which lets you unpackage all the items in a tuple in a single operation.

  • Learn about what deconstructing a tuple means

  • Explore four ways to deconstruct a tuple

14
Deconstructing Tuple Elements with Discards

Deconstructing tuple elements with discards. This means if you don’t want to deconstruct all the items in a tuple, and only want a few of them, you can use discards for the items you don’t want.

  • Understand what discards are

  • Learn how to use discards

15
Deconstructing a User-Defined Type with Discards

Learn about deconstructing a user-defined type with discards. As the user-defined type is in your control, you can use various deconstruct() functions, with varying parameters. This could help your deconstruction by not having to use discards.

  • Learn about deconstructing a user-defined type with discards

  • Understand how to create custom deconstruct functions

16
Test Your Knowledge
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
2
2 out of 5
2 Ratings

Detailed Rating

Stars 5
0
Stars 4
0
Stars 3
1
Stars 2
0
Stars 1
1
800984d19c0a596fbc1051e3348e5c3f
30-Day Money-Back Guarantee

Includes

8 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion