Programming · ADC-03-03

Basic C# Programming

Basic C# Programming is a course in the fundamentals of C# on .NET, from variables, conditions, loops and collections to object-oriented programming, exception handling, files, JSON and unit testing. It suits newcomers building applications in C# and developers who already know a C-style language such as Java or PHP.

Updated
From 5,310 THB / person 5,900 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration18 hours · 3 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

C# is Microsoft's object-oriented language for building web APIs, desktop apps, games and cloud services on .NET, an open-source platform that runs on Windows, macOS and Linux. Its C-style syntax makes it easy to pick up for anyone who has written C, Java, JavaScript or PHP, and the current C# 14 on .NET 10 (LTS) lets you write much shorter and safer code than earlier versions.

This course builds a solid foundation in C#, from variables, data types, conditions, loops, methods and collections to object-oriented programming with classes, records, inheritance, polymorphism, interfaces, delegates and events. It then moves on to everyday skills: handling exceptions and null values, generics, basic LINQ, reading and writing files and JSON, async/await, debugging and unit testing. Every topic is practised in console apps built from real business scenarios. (3 days, 6 hours per day, 18 hours in total, Beginner level.)

What you’ll gain

  • Install and use the .NET 10 SDK with Visual Studio 2026 or VS Code to write and run C# programs
  • Understand variables, data types, value and reference types, and C# operators
  • Control program flow with conditions, loops and pattern matching
  • Use methods, arrays and collections such as List and Dictionary
  • Write object-oriented code with classes, records, inheritance, polymorphism and interfaces
  • Use delegates, lambdas, events and generics
  • Handle exceptions and null values, read and write files and JSON, and use basic async/await
  • Debug programs and write basic unit tests with xUnit

Who this course is for

  • Anyone who wants to start developing applications in C#
  • Developers using other languages who want to move to C# and .NET
  • People who learned Visual C# on the .NET Framework and want to update to the modern language
  • IT managers and team leads who want to understand their team's C# code

Prerequisites

  • Some programming experience in any language, including variables, conditions and loops
  • Experience with a C-style language such as C, Java, JavaScript or PHP will help you learn faster
  • Confident computer use and software installation
  • A Windows, macOS or Linux laptop that can run the .NET 10 SDK, with rights to install software

Curriculum

Course Details

This course is the 2026 edition of Basic Visual C#, which originally taught C# on the .NET Framework. It has been rewritten for C# 14 on .NET 10 (LTS). It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as lectures with labs. Beginner level. Day one covers language basics from variables to methods and collections, day two covers object-oriented

programming with classes, records, inheritance, interfaces, delegates and events, and day three covers everyday skills: exceptions, nullable types, generics, LINQ, files and JSON, async/await, debugging and unit testing, finishing with a workshop app built from a business scenario. The course focuses on the language through console apps; working with databases is covered in C# Programming with SQL Server 2025. All tools are free on Windows, macOS and Linux.

Day 1 C# Language Basics

Section 1: Lab: Getting Started with C# 14 and .NET 10

  • What C# and .NET can build, and how .NET differs from the .NET Framework
  • Install the .NET 10 SDK with Visual Studio 2026 or VS Code
  • Create a console project with dotnet new and top-level statements
  • File-based apps: run a single .cs file with dotnet run
  • Lab: a first program that reads input and prints results

Section 2: Variables, Data Types and Conversion

  • Variables, constants, var and variable scope
  • Built-in types for numbers, text, Booleans and dates
  • How value types differ from reference types
  • Convert between types with Parse, TryParse and Convert
  • String interpolation and raw string literals

Section 3: Lab: Operators, Expressions and Pattern Matching

  • Arithmetic, comparison and logical operators
  • Order of evaluation in expressions
  • Switch expressions and basic pattern matching
  • Comments and XML documentation comments
  • Lab: a shipping cost calculator by weight and zone

Section 4: Lab: Conditions and Loops

  • if, else if and multi-way switch
  • while, do while and for
  • foreach over collections
  • break and continue
  • Lab: a menu program that loops until the user chooses to exit

Section 5: Lab: Methods, Arrays and Collections

  • Write methods with parameters and return values
  • Optional parameters, named arguments and params
  • Arrays and collection expressions
  • Everyday use of List and Dictionary
  • Lab: a program that stores products and totals an order
Day 2 Object-Oriented Programming

Section 6: Lab: Classes, Objects and Encapsulation

  • Classes and objects, and the object lifecycle
  • Properties, auto-properties and the field keyword in C# 14
  • Constructors and primary constructors
  • Access modifiers: public, private, internal and protected
  • Lab: customer and product classes that validate values before saving

Section 7: Records, Structs and Static Members

  • Records for data compared by value
  • Structs and when to use them
  • Static properties, static methods and static classes
  • Release resources with IDisposable and using instead of destructors
  • Lab: store order data in records

Section 8: Lab: Inheritance and Polymorphism

  • Inheriting classes and calling base
  • virtual, override and sealed
  • Polymorphic methods and casting with is and as
  • Type patterns across several kinds of object
  • Lab: a staff system where full-time and daily workers are paid differently

Section 9: Lab: Interfaces and Abstract Classes

  • Design interfaces as a code standard
  • Implement interfaces implicitly and explicitly
  • Abstract classes and abstract methods
  • Choosing between an interface and an abstract class
  • Lab: several payment methods behind a single interface

Section 10: Lab: Delegates, Lambdas and Events

  • Delegates and invoking methods through them
  • Func, Action and lambda expressions
  • Events and event handlers
  • Create a custom event with EventArgs
  • Lab: raise an alert when stock falls below a set level
Day 3 Real-World Skills and Workshop

Section 11: Lab: Exceptions and Handling Null

  • try, catch and finally
  • Create and throw custom exceptions
  • Nullable reference types and compiler warnings
  • The ?. and ?? operators and null-conditional assignment in C# 14
  • Lab: stop the program crashing when users enter bad data

Section 12: Lab: Generics and Basic LINQ

  • Generic classes and generic methods
  • Generic constraints
  • LINQ: Where, Select, OrderBy, GroupBy and Sum
  • An overview of extension members in C# 14
  • Lab: a sales report by product category with LINQ

Section 13: Lab: Files, Streams and JSON

  • Work with files, folders and paths
  • Read and write text and binary files with streams
  • Convert objects to and from JSON with System.Text.Json
  • Basic XML reading for legacy systems
  • Lab: save and load product data from a JSON file

Section 14: Lab: Async, Debugging and Unit Testing

  • async and await for file work and other waiting tasks
  • Breakpoints, watches and the call stack in the debugger
  • Write unit tests with xUnit
  • Run tests in Test Explorer and with dotnet test
  • Lab: write tests for a discount calculation method

Section 15: Workshop: A Data App from a Business Scenario

  • Turn business requirements into classes, properties and methods
  • Split code into projects and a class library
  • Workshop: a console app that manages products, orders and sales reports
  • Present the result and next steps towards web, database and desktop development

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What is the difference between value types and reference types in C#?

Value types such as int, double, bool, structs and enums hold their value directly, so assigning one to another variable makes a separate copy. Reference types such as classes, strings, arrays and List hold a reference to an object, so two variables can point to the same object and a change through one is visible through the other. Records are reference types compared by value, and with nullable reference types enabled the compiler warns you when a null value might be used by mistake.

What are the steps to write a first C# program on .NET 10?

Install the .NET 10 SDK, then use Visual Studio 2026 on Windows or VS Code with the C# Dev Kit on any operating system. Create a console project with dotnet new console or from the Visual Studio menu, write your code in Program.cs using top-level statements, and run it with the Run button or dotnet run. For short pieces of code, .NET 10 can also run a single .cs file straight away with dotnet run followed by the file name, with no project needed.

What is encapsulation in C#, and how is it done?

Encapsulation means hiding an object's internal data and exposing it only through controlled access. In C# you keep data private and expose it through properties with get and set accessors that can validate values, for example rejecting a negative price. In C# 14 the field keyword lets a property use its backing field without declaring it yourself. Together with access modifiers such as public, private, protected and internal, this lets you change internal code without affecting the rest of the program.

Who is the Basic C# Programming course for, and what should I know beforehand?

It suits people who want to start building apps in C#, developers moving to .NET from other languages, people who learned Visual C# on the .NET Framework and want to update, and IT managers who need to understand their team's code. You should have some programming experience and understand variables, conditions and loops; a background in a C-style language such as C, Java, JavaScript or PHP will help you learn faster.

What will I be able to do after the Basic C# Programming course?

You will be able to write C# 14 programs on .NET 10 using variables, conditions, loops, methods and collections, design object-oriented code with classes, records, inheritance, interfaces, delegates and events, handle exceptions and null values, use generics and LINQ, read and write files and JSON, use basic async/await, and debug and unit test your code, ready to move on to web, database and desktop development. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Basic C# Programming course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as exercises based on systems your team maintains or a focus on reading and updating your organisation's older C# code. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.