We may earn an affiliate commission when you visit our partners.
Course image
Mosh Hamedani

With over 50,000 happy students and 15,000+ positive reviews, this course is Udemy's most popular course for learning C# from scratch.

Read more

With over 50,000 happy students and 15,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.

I owe a lot of it to you because your courses have been 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

30- Take the course, watch every lecture, and do the exercises, and if you feel like this course is not for you, ask for a full refund within 30 days. All your money back, no questions asked.

He is the author of several best selling Udemy courses with more than 120,000 students in 192 countries. He has a Master of Science in Network Systems and Bachelor of Science in Software Engineering. His students describe him as passionate, pragmatic and motivational in his teaching.

Do you want to start learning C# now?

Join the other 50,000+ happy students who have taken this course and start coding within a few minutes.

Enroll now

What's inside

Learning objectives

  • 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

Syllabus

Introduction

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

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

Read more
A Note on Taking this Course
Asking Questions
Before You Get Started
Introduction to C# and .NET Framework

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

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

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

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

Link to download Visual Studio Community Edition.

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

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.

Fundamentals of C# and .NET

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

Primitive Types and Expressions

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

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

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

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

A demo of declaring various variables and constants.

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

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

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

What are Logical Operations?

Demonstration of using operators to build expressions.

Different types of commenting notations in C#.

Non-Primitive Types

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

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

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

A brief overview of structures and when to use them.

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

Demonstration of declaring arrays and accessing their elements.

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

Demonstration of various ways to create strings.

What enums are and how to declare them.

Demonstration of declaring enums and accessing their members.

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

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

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

Non-primitive Types
Control Flow

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

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.

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

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

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

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.

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.

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

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

Arrays and Lists

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.

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

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

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
Working with Dates

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).

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

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

Working with Text

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

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

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.

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

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

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.

Working with Files

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.

Here, I'll show you how to:

  • Copy a file
  • Check if a file exists
  • Read the content of a file
  • Delete a file

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

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
Exercises
Debugging Applications

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.

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.

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

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

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Teaches C#, which is an industry standard for building cross-platform mobile apps, games, web apps, and desktop apps
Taught by Mosh Hamedani, who is recognized for his work in C# education
Develops foundational C# programming skills and knowledge necessary for a career in .NET development
Examines C# concepts and tools highly relevant to industry needs and standards
Teaches C# programming skills which may be used for personal growth and development
Requires no prior programming knowledge, making it accessible to beginners

Save this course

Save C# Basics for Beginners: Learn C# Fundamentals by Coding to your list so you can find it easily later:
Save

Reviews summary

A well-received c# course

According to students, this course is a well-received C# course, with students saying Mosh is a phenomenal teacher. Mosh's engaging videos are easy to follow and his personality shines through in his teaching style. Students say that they feel motivated and excited to learn each new concept, and are looking forward to taking Mosh' next course.
Mosh's videos are engaging and easy to follow.
Mosh's teaching style is motivating and exciting.
"I feel motivated and excited to learn each new concept."
Mosh is a phenomenal teacher.
"Mosh is a phenomenal teacher."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in C# Basics for Beginners: Learn C# Fundamentals by Coding with these activities:
Compile materials
Review all the learning materials for the course to prepare.
Show steps
  • Gather all the materials for the course
  • Review the materials and make notes
  • Organize the materials into a logical structure
Review 'C# in Depth' by Jon Skeet
Supplement your course materials by reading a comprehensive book on C#.
Show steps
  • Read the book and take notes
  • Highlight important concepts
  • Complete the exercises and examples
Follow C# tutorials
Enhance your C# skills by following guided tutorials that provide step-by-step instructions.
Show steps
  • Identify a C# topic you want to learn
  • Search for reputable tutorials on the topic
  • Follow the tutorials and complete the exercises
Two other activities
Expand to see all activities and additional details
Show all five activities
Join a C# study group
Collaborate with peers to discuss C# concepts, share knowledge, and work on projects together.
Show steps
  • Find a study group or create your own
  • Set regular meeting times
  • Discuss C# concepts, work on problems, and share resources
Mentor a junior C# developer
Reinforce your C# knowledge by sharing it with others and guiding their learning.
Show steps
  • Find a junior C# developer who needs guidance
  • Set regular mentoring sessions
  • Share your knowledge and experience
  • Provide feedback and support

Career center

Learners who complete C# Basics for Beginners: Learn C# Fundamentals by Coding will develop knowledge and skills that may be useful to these careers:
Software Developer
Software Developers are responsible for designing, developing, and maintaining software applications. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for software development. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to build robust and efficient software applications.
Web Developer
Web Developers are responsible for designing, developing, and maintaining websites. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for web development. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to build dynamic and interactive websites.
Mobile App Developer
Mobile App Developers are responsible for designing, developing, and maintaining mobile applications. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for mobile app development. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to build user-friendly and high-performing mobile applications.
Data Scientist
Data Scientists are responsible for collecting, analyzing, and interpreting data to extract valuable insights for businesses. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for data science. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to build data-driven applications and make informed decisions.
Business Analyst
Business Analysts are responsible for understanding and analyzing business processes to identify areas for improvement. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for business analysis. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to build data-driven applications and make informed decisions.
Quality Assurance Analyst
Quality Assurance Analysts are responsible for testing and evaluating software applications to ensure they meet quality standards. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for quality assurance. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to build robust and reliable software applications.
Technical Writer
Technical Writers are responsible for creating and maintaining technical documentation, such as user manuals, white papers, and training materials. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for technical writing. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to create clear and concise documentation.
Project Manager
Project Managers are responsible for planning, executing, and closing projects. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for project management. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to manage projects effectively and efficiently.
System Administrator
System Administrators are responsible for installing, maintaining, and troubleshooting computer systems. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for system administration. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to manage computer systems effectively and efficiently.
Database Administrator
Database Administrators are responsible for designing, developing, and maintaining databases. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for database administration. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to manage databases effectively and efficiently.
Network Administrator
Network Administrators are responsible for designing, developing, and maintaining computer networks. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for network administration. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to manage computer networks effectively and efficiently.
IT Support Specialist
IT Support Specialists are responsible for providing technical support to users of computer systems. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for IT support. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to provide effective technical support.
Computer Programmer
Computer Programmers are responsible for writing and maintaining computer programs. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for computer programming. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to write efficient and reliable computer programs.
Software Engineer
Software Engineers are responsible for designing, developing, and maintaining software systems. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for software engineering. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to build robust and scalable software systems.
Computer Scientist
Computer Scientists are responsible for conducting research in the field of computer science. This course provides a solid foundation in C# and .NET Framework, which are essential technologies for computer science research. By learning about primitive types, non-primitive types, control flow, arrays and lists, and more, you'll gain the skills and knowledge needed to conduct groundbreaking research in the field of computer science.

Reading list

We've selected ten books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in C# Basics for Beginners: Learn C# Fundamentals by Coding.
Comprehensive guide to C# 7 and .NET Core 2.0. It covers a wide range of topics, from the basics of the language to advanced topics such as cloud computing and machine learning.
More comprehensive guide to C# for experienced programmers. It covers a wide range of topics, from the basics of the language to advanced topics such as concurrency and generics.
Comprehensive guide to C# for experienced programmers. It covers a wide range of topics, from the basics of the language to advanced topics such as concurrency and generics.
Good reference for experienced C# programmers. It covers a wide range of topics, from the basics of the language to advanced topics such as LINQ and async programming.
Good introduction to the .NET Framework and C# for beginners. It covers the basics of the language, as well as more advanced topics such as object-oriented programming and Windows Forms.
Good choice for those who have no prior programming experience. It covers the basics of C# in a clear and concise way, and it includes plenty of examples to help you learn.
Good introduction to Entity Framework Core, a popular object-relational mapping (ORM) framework for .NET. It covers the basics of Entity Framework Core, as well as more advanced topics such as data migrations and performance tuning.
Good choice for those who want to learn the essentials of C# 6.0. It covers the new features of the language, as well as more advanced topics such as async programming and unit testing.
Provides a comprehensive overview of C# programming, covering everything from basic syntax to advanced concepts like generics and delegates. It's a great resource for beginners who want to learn C# quickly and easily.
Good introduction to ASP.NET Core, a popular web framework for .NET. It covers the basics of ASP.NET Core, as well as more advanced topics such as routing and authentication.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to C# Basics for Beginners: Learn C# Fundamentals by Coding.
C# Advanced Topics: Prepare for Technical Interviews
Most relevant
Xamarin Forms: Build Native Cross-platform Apps with C#
Most relevant
C# Intermediate: Classes, Interfaces and OOP
Most relevant
C# Developers: Learn the Art of Writing Clean Code
Most relevant
Entity Framework in Depth: The Complete Guide
Most relevant
Complete C# Masterclass
C Tutorial for Beginners
Project: Creating Your First C++ Application
Node.js: The Complete Guide to Build RESTful APIs (2018)
Our mission

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.

Affiliate disclosure

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.

© 2016 - 2024 OpenCourser