
Explore a beginner-friendly introduction to C#, guiding you from nothing to everything as you learn to build desktop and mobile apps using the Universal Windows Platform on Windows 10.
Explore Microsoft's .NET initiative, enabling software development across the web using multiple .NET-compatible languages, including C#, Visual Basic, and Visual C++. Learn how ASP.NET supports building web-based applications.
Understand how C# relies on the .NET framework to run applications, and reuse the .NET Framework Class Library's thousands of prebuilt classes to speed development.
Explore the Visual Studio integrated development environment for C# development, enabling you to write, run, test, and debug programs with the community edition on Windows.
Explore Visual Studio Community IDE, Microsoft's integrated development environment for creating, running, and debugging C# and .NET applications across multiple versions. It surveys the Visual Studio Community IDE.
Download and install Visual Studio Community IDE, select workloads and 'install while downloading' to speed up installation, then launch the IDE.
Learn to switch Visual Studio themes by using Tools > Options > Environment to choose blue, dark, or light. Try blue, then revert to dark.
Create a new project or open an existing one in Visual Studio, exploring projects, solutions, and templates for Windows Forms apps with a GUI.
Learn to create a Windows Forms app by designing a main form with label and picturebox controls, using pre-existing .NET controls and adjusting properties to build the GUI.
Master the menu bar and toolbar in the Visual Studio IDE to open windows, save and print files, run apps, customize toolbars, and read icon tooltips.
Navigate the Visual Studio IDE using windows for project files and controls, accessible from the View menu, and manage auto-hide tabs to pin or reveal windows.
Navigate the solution explorer and tool box to manage files, set the startup project, and use drag-and-drop controls to create forms quickly.
Open the properties window to view, sort, and edit form and control properties such as size, color, and position, with descriptions and the IDE writing code for you.
Create a simple Windows Forms app that displays 'Welcome to C# programming' and an image using a label and picture box, built with visual app development in Visual Studio.
Create a simple app with a label and picture box on a form; set the label text, font (Segoe UI, 24 pt), turn off auto size, and center the text.
Import an image into a picture box, adjust the image property and size mode to stretch, then save the solution and run the app in debug mode.
Create, compile, and run a simple console app in Visual Studio; name the project, display line numbers, and use using directives and namespaces from the .NET framework class library.
Define a user defined class named program and learn that the main method serves as the entry point. Understand naming conventions, identifiers, and the main method signature.
Learn to write and run C# code with IntelliSense, parameter info, and overloaded methods, while using cursor indentation, the console.writeline command, semicolon errors, and syntax color highlighting.
Rename the default source file from program.cs to welcome1 in the solution explorer, then build and run with Ctrl-F5 to display welcome to C# course in a console window.
Learn how the IDE shows error messages with red squiggles and an error list, and how C# comments, including // and /* */ styles, explain code without executing.
Demonstrate displaying a single line of text with two statements to produce the same output by comparing Console.Write and Console.WriteLine; write does not advance to a new line.
Learn how to display multiple lines in C# with a single statement using new line characters and escape sequences, including backslash n, tabs, and carriage returns.
Master C# string interpolation to format strings by inserting variables using a dollar-prefixed interpolated string with braces, demonstrated with Console.WriteLine and type string variables.
Learn to create a C# app that reads two integers from the keyboard, parses them with int.Parse, computes their sum, and displays the result, while handling invalid input.
Explore C# arithmetic basics, including binary operators, multiplication with asterisks, and the remainder operator percent. Learn integer division, truncation, parentheses grouping, and operator precedence rules.
Explore decision making in C# by using equality and relational operators in a six‑if statement app that reads two integers, compares them, and displays true results.
create a visual c# console app under the net framework, rename program.cs to accounttest.cs, and add a second class account.cs using the solution explorer.
Define a C# account class with a private name instance variable, implement setName and getName methods, and model access with UML diagrams showing public and private members.
Instantiate objects with new, assign to myAccount, and call getName and setName via the dot operator. Build the solution in Visual Studio and run accountTest to display the entered name.
Replace the traditional get and set methods with the C# public Name property on the account class, using get and set accessors to retrieve and assign the private name field.
Learn how constructors initialize objects and how auto implemented properties simplify coding. Explore default constructors and constructor overloading to create accounts with specific names.
Create a bank app by building an account class that maintains a name and a decimal balance, validates inputs, and supports deposits to update balances.
Explore how C# controls program flow with sequence, selection, and iteration structures, including activity diagrams and statements such as if, if-else, switch, while, do-while, for, and foreach.
Demonstrate nested if-else logic by building a student class with name and average properties and a read-only letter grade, then display names, averages, and grades in Main.
Understand the if statement and if-else constructs in C# for single selection, boolean logic, guard conditions, blocks with braces, nested if-else, and the conditional operator.
Master while iteration, guard conditions, and the merge symbol; apply counter-controlled iteration to a class averaging algorithm that processes ten grades, computes total and average, and notes integer division.
Explore sentinel-controlled iteration by building a class average program that reads grades until a sentinel value ends input, then compute and format the average with two decimals.
Explore the C# increment and decrement operators, distinguishing prefix and postfix forms, watch how they affect expressions, and see how they interact with compound assignments and operator precedence.
Master the for iteration statement in c#, covering the header’s initialization, condition, and increment, plus variable scope, optional clauses, and prefix versus postfix increments.
Demonstrates a for-loop compound-interest calculation on a 1000 principal at 5% over 10 years, printing yearly balances with currency formatting and highlighting decimal versus double for money.
Explore the do-while statement in C#. The body executes at least once because the condition is checked after the loop body, demonstrated by a program that outputs 1 to 10.
Explore the switch multiple selection statement in c# using a switch expression to classify 0–100 grades into a–f, tally counts, compute the class average, and handle end-of-file input.
Learn how break and continue statements alter flow in C#, terminating loops or skipping iterations with practical examples across for, while, do-while, and for each.
Learn how relational and equality operators form conditions and how conditional and or, inclusive or, exclusive or, and negation build complex logic with truth tables and short-circuit evaluation.
Explore static methods and class variables that operate at the class level. Learn to call static methods via the class name and distinguish static fields from instance data.
Define a static maximum method that takes three doubles, uses nested Math.Max calls to return the largest value, and call it from main after converting inputs.
Explore three ways to call methods in C#, including instance, dot notation, and static class calls, and learn about return values, promotion, and casts in .NET.
Explore random number generation in C# with the Random class, using Next methods, scaling, and shifting to simulate dice rolls and coin tosses, yielding pseudo-random sequences that differ each run.
Simulate 60 million rolls of a six-sided die using random.next to generate values 1–6, tally each face with a switch, and explore shifting and scaling to produce other value sequences.
Simulate craps in C# using an enumeration for game status, a two-dice roll method, and a switch statement that controls wins on the first roll or by making the point.
Explore the scope of declarations in C#: parameters, locals, methods, properties, and fields, and how class-wide scope, for statement headers, and hidden fields affect access and visibility.
Explore how the method call stack uses activation records to track return addresses, push and pop stack frames, and preserve local variables during method calls, highlighting stack overflow risks.
Explore method overloading in C#, where the same name resolves to different parameter sets by number, type, and order, with int and double square overloads and signature rules.
Master optional and named parameters in C#, using default values to enable calling methods with omitted or reordered arguments.
Learn recursion in C# by implementing a factorial calculator from zero to ten, illustrating base cases, recursive calls, problem decomposition, and the shift from long to big integer types.
Explore how C# handles value types and reference types, and how arguments pass by value or by reference using ref and out to modify originals, with a square example.
Declare and create arrays in C#, understand zero-based indexing and the length property, and initialize them with new or initializer lists, with optional resizing while preserving elements.
Learn to declare, create, initialize, and manipulate arrays in c# with a five-element array, a ten-element sum, and for each iteration; cover constants and naming conventions.
Explore how to visualize data distributions with arrays by building a bar chart of grades and dice frequencies, using for loops, type inference, and string formatting.
Explore exception handling in C sharp, using array bounds checks and index out of range exception, and implement try and catch blocks to build fault-tolerant programs that continue execution.
Develop a card shuffling and dealing simulation in C# by building a card class with face and suit, a 52-card deck, and shuffle and deal capabilities with random number generation.
Explore passing arrays and array elements to methods in C# by reference or by value, and observe how bulk or single element modifications occur in a demonstration app.
Explore a grade book class that stores grades in a one-dimensional array, computes average, min, max, and a grade distribution bar chart, and shows a version with a two-dimensional array.
Explore multidimensional arrays in C#, including rectangular two-dimensional arrays and jagged arrays, with rows and columns, initialization, access via indices, and traversal using nested and foreach loops.
Explore a C# grade book using a rectangular two-dimensional array to store 10 students' grades on three exams, with methods for minimum, maximum, average, and bar chart of grade distribution.
Learn how variable length argument lists work in C#, using params to pass doubles to an average method, with foreach summing and averaging 2, 3, or 4 args.
Pass command line arguments to a C# app and access them in main via string[] args; validate using args.length and convert inputs to integers to initialize and display an array.
Explore how C# passes arrays by value and by reference, noting that arrays are reference types and that ref lets a method modify the caller’s variable or replace its reference.
Learn how LINQ queries filter an array of integers using a predicate, project results with select, and order them, while understanding from clauses, range variables, and implicit typing.
Learn to query an array of employee objects with linq, filter by salary, order by last name and first name, and project results into anonymous types.
Explore the dot net framework collections, focusing on List<T> as a dynamic, generic container that automatically resizes, with methods like add, insert, remove, and contains for efficient data management.
Learn to query a generic list with LINQ, filter and uppercase strings, test starts with, use let for temporary results, and leverage deferred execution with conversions to list or array.
demonstrates a time class with hour, minute, and second properties that validates inputs and throws ArgumentOutOfRangeException for out-of-range values, and provides universal and standard time strings.
Explore how public and private control govern member visibility in a class, showing public variables versus private ones and the compiler errors when accessing private members from outside.
Explore how the this reference lets a C# object access its own members, using implicit and explicit this to reveal private data and shadowing in a simple time class.
Explore the time class case study with overloaded constructors, showing constructor chaining, default parameter overloads, and validation of hour, minute, and second in C# from nothing to everything.
Explore composition in C#, where a class holds references to other objects like date instances, with validated properties, leap year checks, and toString representations for employees' birth and hire dates.
Understand how the common language runtime uses a garbage collector to reclaim memory and invoke destructors, while timing remains unpredictable.
Learn how static class members share data across all objects, track employee instances with a private static count, and manage access via public static methods while understanding garbage collection.
Learn how readonly instance variables enforce least privilege by making an object's values unmodifiable after construction, and distinguish const from readonly with initialization in declarations or constructors.
Learn how Visual Studio features like Class View and the Object Browser display classes, members, and project structure, with expand and collapse navigation and quick access to documentation.
Create a time object and initialize its hour, minute, and second properties with object initializers. Observe how a no-argument constructor allows defaults for unspecified properties and preserves order.
Explore operator overloading by implementing plus, minus, and multiply for a complex number defined as a struct to mimic value types, illustrating how two complex numbers combine with common arithmetic.
Use extension methods to add functionality to a time class without changing its source. Create display time and add hours as static extensions with the this keyword, enabling cascade calls.
C# is one of the top 5 programming languages around the world, it is written to be a general-purpose, functional, generic, and object-oriented programming language.
You will learn how to use Visual Studio Community to build wonderful C# apps using simple, great and unique techniques.
No programming experience is needed to take this course. Only download Visual Studio Community from Microsoft ( It's free ) and start with us step by step.
At the end of this course, you will master C#, and you will be ready for any job interview however hard it is.
C# syntax is highly expressive, yet it's also simple and easy to learn. The curly-brace syntax of C# will be instantly recognizable to anyone familiar with C, C++, Java or JavaScript. Developers who know any of these languages are typically able to work productively in C# within a short time.
C# provides powerful features such as nullable types, delegates, lambda expressions, pattern matching, and safe direct memory access. C# supports generic methods and types, which provide increased type safety and performance. C# provides iterators, which enable implementers of collection classes to define custom behaviors for client code. Language-Integrated Query (LINQ) expressions make the strongly-typed query a first-class language construct.
As an object-oriented language, C# supports the concepts of encapsulation, inheritance, and polymorphism. A class may inherit directly from one parent class, but it may implement any number of interfaces. Methods that override virtual methods in a parent class require the override keyword as a way to avoid accidental redefinition. In C#, a struct is like a lightweight class; it's a stack-allocated type that can implement interfaces but doesn't support inheritance. C# also provides records, which are class types whose purpose is primarily storing data values.