C# Basics for Beginners: Learn C# Fundamentals by Coding
4.7 (6,559 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
26,498 students enrolled
Wishlisted Wishlist

Please confirm that you want to add C# Basics for Beginners: Learn C# Fundamentals by Coding to your Wishlist.

Add to Wishlist

C# Basics for Beginners: Learn C# Fundamentals by Coding

Learn C# and programming mindset using high-quality, bite-sized videos with real-world examples and lots of exercises.
Bestselling
4.7 (6,559 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
26,498 students enrolled
Created by Mosh Hamedani
Last updated 5/2017
English
English
Current price: $15 Original price: $150 Discount: 90% off
30-Day Money-Back Guarantee
Includes:
  • 5.5 hours on-demand video
  • 9 Articles
  • 2 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Learn the fundamentals of C# and .NET Framework
  • Work with primitive types and expressions
  • Work with non-primitive types (classes, structs, arrays and enums)
  • Learn the difference between value types and reference types
  • Control the flow of programs using conditional statements
  • Use arrays and lists
  • Work with files and directories
  • Work with text
  • Work with date and time
  • Debug C# applications effectively
View Curriculum
Requirements
  • Visual Studio Community Edition (FREE)
Description

With over 22,000 students and 5,000+ positive reviews, this course is Udemy's most popular course for learning C# from scratch! 


C# is a beautiful cross-platform language that can be used to build variety of applications. With C#, you can build mobile apps (for Windows, Android and iOS), games, web sites and desktop applications.


Once you master fundamentals of C# and programming with .NET framework, you'll have lots of options in front of you. You can choose to build mobile apps if you prefer, or you can change job and work as a web developer. As long as you know the fundamentals well, switching to different technology stacks is pretty easy.


In this course, Mosh, author of several best-selling C# courses on Udemy, teaches you the fundamentals of C# programming in a clear, concise and step-by-step way. Note only that, but he'll also teach you best practices and shortcuts to help you become a better developer.


Every section comes with a few bite-sized video lectures and a quiz or programming exercises. These exercises are carefully chosen from academic and real-world examples to train your "programming brain". If you want to be a successful programmer, who has many high-paid job offers and freedom to "choose", you need to learn how to think like a programmer. And this is what you're going to get out of these exercises. All exercises come with solutions, so you can compare your solutions with Mosh's to find areas for improvement.


There are plenty of free tutorials and videos that teach you C# and they are great if all you want to learn is C# constructs. But if you want to learn C# and become a better programmer with a bright future and lots of options, this is the course for you. For every topic, not only will you learn the whats, but you'll also learn the whys, and hows. You'll see common errors that pop up as part of developing applications with C#. Mosh explains these errors in detail, and shows you how to resolve them.




THE COMPLETE C# PACKAGE

This course is the first part of Mosh's complete C# series on Udemy:

  • Part 1: C# Basics for Beginners: Learn C# Fundamentals by Coding 
  • Part 2: C# Intermediate: Classes, Interfaces and Object-oriented Programming
  • Part 3: C# Advanced: Take Your C# Skills to the Next Level



WHAT OTHER STUDENTS WHO HAVE TAKEN THIS COURSE SAY:

"I’ve actually landed my first job as a Junior software developer. I owe a lot of it to you because your courses have been EXTREMELY helpful. May God bless you and your efforts to create high quality courses. This has really changed my life from working as a security guard and doing websites for free, now I am a professional." -Danish Jafri


"Great Instructor, Great Course, Mosh does a great job of breaking down the material and making it interesting." -Michael Gardner


"You can hear the passion in his voice which makes the course sound 10x more exciting then someone who just does it for the money." -Tim Medcalf


"Great Instructor, I love the way he teaches the course." -Edward Tkachev


"I love Mosh's approach of delivering the theory and then the practice. Audio and video quality are superb." -Paul Mooney


"You can definitely tell that Mosh is not only an experienced programmer, but he also cares deeply about producing great quality lessons and ensuring that his students are understanding the content." -David


This course comes with a 30-day money-back guarantee. If you're not satisfied with this course for any reasons, you can ask for a full refund within 30 days of enrolling in the course. All your money back, no questions asked. 


So go ahead, join the other 22,000+ happy students who have taken this course and start coding within a few minutes.


Who is the target audience?
  • Newbies or students looking for a refresher on the basics of C# and .NET
Curriculum For This Course
86 Lectures
05:26:14
+
Introduction
4 Lectures 06:13

A brief overview of what you're going to learn from this course.

Preview 01:21

Get to know your instructor, his educational background, work experience and interests outside programming.

Preview 01:40

A Note on Taking this Course
00:14

Asking Questions
02:58
+
Introduction to C# and .NET Framework
8 Lectures 18:17

A brief overview of what you're going to learn in this section.

Introduction
00:55

What is the difference between C# and .NET? That's a common question amongst beginners that is answered in this lecture.

C# vs .NET
00:53

Learn about the run-time environment of .NET applications and how it is different from native C and C++ applications.

What is CLR?
02:12

Learn about the building blocks of .NET applications: classes, namespaces, assemblies

Architecture of .NET Applications
02:42

Link to download Visual Studio Community Edition.

Getting Visual Studio
1 page

Write your first C# program to get a feel for the language.

Our First C# Application
09:53

ReSharper is a commercial plug-in for Visual Studio that helps you write code faster with less effort. If you're a student or work on open-source projects, you can get a free license.

What is ReSharper?
00:27

Fundamentals of C# and .NET
3 questions

A quick wrap of what you learned in this section and what is coming next.

Summary
01:15
+
Primitive Types and Expressions
12 Lectures 51:46

A quick overview of what you're going to learn in this section.

Introduction
00:26

How to declare variables and constants in C# along with guidelines on naming conventions and choosing the right primitive type.

Variables and Constants
08:43

What is overflowing and the effect of checked keyword in C#?

Overflowing
02:13

Where does a variable or constant has meaning? That's determined by the scope.

Scope
01:02

A demo of declaring various variables and constants.

Demo: Variables and Constants
11:27

Various kinds of type conversion: implicit, explicit and conversion between non-compatible types using the Convert class.

Type Conversion
04:48

Demonstration of a few type conversion scenarios along with a quick introduction to try/catch blocks.

Demo: Type Conversion
10:16

List of arithmetic, comparison, assignment, logical and bitwise operators.

Operators
04:12

What are Logical Operations?
2 pages

Demonstration of using operators to build expressions.

Demo: Operators
06:21

Different types of commenting notations in C#.

Comments
01:43

Primitive Types and Expressions
6 questions

A quick wrap of what you learned in this section and what is coming next.

Summary
00:35
+
Non-Primitive Types
14 Lectures 59:02

A quick overview of what you're going to learn in this section.

Introduction
00:25

How to create classes and objects and the effect of static modifier on fields and methods.

Classes
05:55

Demonstration of creating classes and extracting them into separate files for better maintainability.

Demo: Classes
08:27

A brief overview of structures and when to use them.

Structs
01:28

What arrays are, how to declare them and access their elements.

Arrays
02:15

Demonstration of declaring arrays and accessing their elements.

Demo: Arrays
03:51

Different ways to create strings: using string literals, concatenation, String.Format and joining array elements. Also covers verbatim strings,

Strings
05:49

Demonstration of various ways to create strings.

Demo: Strings
07:42

What enums are and how to declare them.

Enums
01:47

Demonstration of declaring enums and accessing their members.

Demo: Enums
07:37

Difference between reference types and value types and how they are managed in the memory.

Preview 03:14

Demonstration of reference types and value types and what happens in the stack and heap memory when you copy variables.

Preview 05:48

Demonstration of the impact of reference types and value types when passing arguments to methods.

Demo: Reference Types and Value Types
03:48

Non-primitive Types
8 questions

A quick wrap of what you learned in this section and what is coming next.

Summary
00:56
+
Control Flow
11 Lectures 41:18

A quick overview of what you're going to learn in this section.

Introduction
01:13

Overview of if / else and switch / case statements as well as the ternary operator.

Conditional Statements
02:43

Here, we'll explore conditional statements using a few examples.

Example 1: a simple program that displays a different message based on the time of the day.

Example 2: a program that sets the price for a product depending on whether the customer is a gold customer or not.

Example 3: a program that displays a different message based on the current season.

Demo: If/Else and Switch/Case
08:40

You can get the solutions in the Supplementary Materials section of this lecture.

Exercises
01:10

Overview of for, foreach, while and do/while blocks and when to use each.

Iteration Statements
04:00

Here, we'll write a simple program to display even numbers from 1 to 10 in an incremental and decremental fashion.

Demo: For Loops
01:56

Here, we'll explore foreach loops using two examples:

Example 1: a program that displays each character of a name on a new line.

Example 2: a program that displays all numbers in an array.

Demo: Foreach Loops
03:42

Here, we'll explore while loops using two examples:

Example 1: re-write of the program to display even numbers from 1 to 10, but this time using a while loop.

Example 2: a program that continuously asks the user to enter their name, and it'll echo the name. You'll learn how to implement infinite loops.

Demo: While Loops
07:00

You'll learn how to use the Random class to generate random numbers and strings (like a random password).

Preview 09:05

Control Flow
4 questions

You can get the solutions in the Supplementary Materials section of this lecture.

Exercises
01:11

A quick wrap of what you learned in this section and what is coming next.

Summary
00:37
+
Arrays and Lists
7 Lectures 29:52

A quick overview of what you're going to learn in this section.

Introduction
00:38

Multi-dimensional (rectangular and jagged) arrays, how to declare them and how to access their elements, as well as overview of a few useful methods in the Array class.

Arrays
04:47

Here, we'll explore some useful properties/methods in the Array class to:

  • Get the number of elements in an array
  • Find an element in an array
  • Sort an array
  • Copy an array
  • Clear an array
Demo: Arrays
10:02

An overview of generic lists and how they are different from arrays, as well as useful methods in the List<> class.

Lists
02:18

Here, we'll explore a few useful methods in the List class to:

  • Add one or a range of elements to a list
  • Remove an element from a list
  • Find an element in a list
  • Get the number of elements in a list
Demo: Lists
10:11

You can get the solutions in the Supplementary Materials section of this lecture.

Exercises
01:18

Arrays and Lists
4 questions

A quick wrap of what you learned in this section and what is coming next.

Summary
00:38
+
Working with Dates
4 Lectures 14:40

A quick overview of what you're going to learn in this section.

Introduction
00:17

An overview of the DateTime structure, how to get the current date/time, how to change dates, and how to format dates in various notations (long, short, date/time, etc).

DateTime
06:20

An overview of the TimeSpan structure, different ways to create TimeSpan objects, and how to use them.

TimeSpan
07:28

This quiz tests your knowledge on DateTime and TimeSpan structures in .NET

Dates and Times Quiz
4 questions

A quick wrap of what you learned in this section and what is coming next.

Summary
00:35
+
Working with Text
9 Lectures 47:35

A quick overview of what you're going to learn in this section.

Introduction
00:17

An overview of useful methods in the String class, how to convert numbers to strings and vice versa, and explanation of format strings.

String
04:24

You'll learn how to use the methods in the String class to:

  • Trim strings
  • Find the index of a character in a string
  • Break a string into parts
  • Replace parts of a string
  • Check if a string is null, empty or whitespace
Demo: String
12:28

Here, you'll see me writing a program to summarise a block of text. This is useful in the home page of blogs where you need to show a summary of each post.

Preview 11:18

An overview of the StringBuilder, how it is different from the String class and when to use it.

StringBuilder
01:07

A demonstration of various useful methods in the StringBuilder class to add / remove something to a string.

Demo: StringBuilder
07:30

Working with Text
4 questions

You can get the solutions in the Supplementary Materials section of this lecture.

Exercises
01:11

Here, I'll introduce you to procedural programming and how to extract re-usable parts of your code into methods.

You can get the solution to the exercises in the Supplementary Materials section of this lecture.

Procedural Programming
08:45

A quick wrap of what you learned in this section and what is coming next.

Summary
00:35
+
Working with Files
7 Lectures 20:10

A quick overview of what you're going to learn in this section.

Introduction
00:20

An overview of the System.IO namespace and various useful classes here to work with files, directories and path. I'll introduce you to File, FileInfo, Directory, DirectoryInfo and Path.

System.IO Namespace
03:58

Here, I'll show you how to:

  • Copy a file
  • Check if a file exists
  • Read the content of a file
  • Delete a file
Demo: File and FileInfo
05:50

In this lecture, you'll learn how to:

  • Create a directory
  • Find all files / directories in a directory
  • Filter the files / directories in a directory
  • Check if a directory exists
  • Delete a directory
Demo: Directory and DirectoryInfo
06:01

Here, you'll see the benefit of using the Path class (over string searching methods) to

  • Get the file name from a path
  • Get the extension in a path
  • Get the directory name in a path
Demo: Path
02:53

Exercises
00:08

Working with Files
2 questions

A quick wrap of what you learned in this section and what is coming next.

Summary
01:00
+
Debugging Applications
7 Lectures 32:01

A quick overview of what you're going to learn in this section.

Introduction
00:21

Overview of debugging tools in Visual Studio, breakpoints, running the application in the debug mode, continuing execution (step over, step into, step out) and inspecting values of variables.

You can get the source code I've used in this video in the supplementary materials section of this lecture.

Debugging Tools in Visual Studio
10:24

You'll see a fundamental problem in the example code in this section. It has a side effect. You'll learn how to remove side effects and write reliable code.

Removing Side Effects
09:15

You'll learn about defensive programming and how it helps writing more reliable code.

Defensive Programming
07:44

How to use the call stack window to find your way in the code during a debugging session.

Call Stack Window
01:46

Difference between Locals and Autos windows and how they are easier to work with than watches.

Locals and Autos Windows
01:53

Debugging Applications
4 questions

A quick wrap of what you learned in this section and what is coming next.

Summary
00:38
1 More Section
About the Instructor
Mosh Hamedani
4.6 Average rating
34,537 Reviews
100,863 Students
16 Courses
Passionate Software Engineer and Best-selling Author

Mosh (Moshfegh) Hamedani is a passionate and creative software engineer with a strong focus on pragmatism and simplicity. He started programming at the age of seven on a Commodore 64. Later, during his high school years, he started learning C and C++ . In 2002, along with the first release of .NET, he shifted his focus to C#. Since then, he has been involved in the design and implementation of numerous software projects, including modern web applications, mobile apps, desktop applications and frameworks.


He started teaching on Udemy in 2014 and currently he has over 100,000 students in 182 countries. He's the author of several best-selling courses on Udemy and #1 ranking course on Pluralsight (Become a Full-stack .NET Developer). 


Mosh has a Master of Science in Network Systems and a Bachelor of Science in Software Engineering. He is also a Microsoft Certified Application Developer, Technology Specialist (Web Applications) and Professional.


Outside the software world, Mosh is a photographer, a pianist and a passionate Latin dancer.