
Explore the fundamentals of c# with data types, variables, and object-oriented concepts like classes, inheritance, and polymorphism. Build programs using arithmetic, input/output, control flow, lists, arrays, and text file processing.
Learn how to download and install the Visual C# Express compiler, register with a Microsoft Passport account, and verify the installation. The next lesson previews its features.
This lesson provides a Visual Studio Express overview, guiding you to start a new console project, name it meaningfully, and navigate Solution Explorer, the program editor, and the error list.
Write your first C# console program: hello world, using System, a static void main in a namespace and class, and Console.WriteLine with Console.ReadKey to keep the window open.
Explore common programming errors in a hello world project, including typos, missing semicolons, and unmatched curly braces, and learn how the compiler and Visual Studio guide you to fixes.
Explore basic console output by comparing Console.Write and Console.WriteLine, control line breaks with multiple writes, understand the newline character, and use Console.ReadKey to keep the window open.
Learn how data types define how identifiers and expressions are used, stored, and operated on. See numeric, string, character, and boolean types with addition and concatenation examples.
Learn the C# numeric data types—int, long, float, double, byte, short, and char—covering ranges, ascii storage for chars, and why double is preferred to float.
Explore string, boolean, and char data types and their usage. Learn string concatenation and length, understand empty strings, and recognize ascii values for characters.
Define what a variable is and how to create meaningful names, emphasizing type, memory location, and the rules: start with a letter, allow letters, numbers, and underscores.
Declare variables by specifying a data type and name, end with a semicolon, and you can place variables of the same type on one line, with a green squiggly line.
Learn to assign data to variables in C# via assignment and initialization statements, understand left-hand and right-hand sides, and see an example like salary equals 20000.
Modify a hello world console program by introducing two string variables, greeting and who, to customize who is greeted and what is said, boosting flexibility beyond hard coding.
Explore the basics of classes and objects in object-oriented programming, defining how a class provides type and behavior, and how objects encapsulate state and operations for reusable software.
Learn to define a class with private data members for first, middle, and last names, a public constructor, and a to string method to display the name.
Implement and override the to string method in your class to display data from its members. Call it on objects to print names and observe how intellisense guides correct usage.
Explore get and set methods for accessing and updating class data, using public string get methods and void set methods, with a preview of C# properties.
Explore property methods in C# that use assignment via properties instead of get and set. Define a public string first with get and set, using value, and observe type safety.
Develop and test utility methods for a class, such as get initials via substring and first letters of first, middle, and last names, and implement a last first format.
Practice implementing get and set methods for the middle name in the name class, add properties for middle and last, and compare property use with method calls while compiling.
Create a date class with month, day, and year fields and a three-parameter constructor. Implement a to-string method returning month/day/year and expose properties to test the class.
Master C# arithmetic operators—addition, subtraction, multiplication, division, and modulus—using integer variables, and see how data types affect results and how modulus detects even or odd numbers.
Explore how arithmetic operator precedence in C# determines results, with multiplicative operators evaluated before additive ones, and how parentheses override the order to change the outcome.
Learn increment and decrement operators, including prefix and suffix forms, and use composite assignment operators like += and -= to update values concisely. These shortcuts aid counting items in code.
declare and initialize constants in C# in the same statement using the const keyword with a data type, name, and value that cannot be changed, such as pi.
Explore the math class in C# by typing math to access a list of functions beyond standard operators, including abs, sqrt, pow, floor, ceiling, max, min, log, trig, and pi.
Explain how mixing arithmetic data types in C# can cause precision loss with implicit conversions, and how explicit conversions using Convert and integer division affect results.
Translate formulas into C# code by applying the correct order of operations, using the math class for sqrt, pow, and abs, and displaying results with console output.
Learn to read data from the keyboard in c# using console read line for strings and characters, prompting the user, and echoing input back after conversion when needed.
Learn to read numeric input from the keyboard in this C# .NET beginner lesson, using Konsole read line and converting the input to int or double.
Explore writing data to the console with Console.Write and Console.WriteLine, compare concatenation to placeholder formatting using {0} and variables, and see how placeholders simplify multi-variable output.
Generate a form letter in C# .NET by prompting for the gift giver, gift, recipient name, and age, converting input to numbers, and printing the letter with placeholders.
Explore relational operators such as greater than, less than, equal to, and not equal to, and see how conditional expressions feed if statements with true or false results.
Explore combining relational expressions with logical operators in C# using && and ||. Build a password check example that shows true only when both conditions are met.
Master the simple if statement in C# by evaluating a relational expression and executing a block when true, initialize variables properly, and explore a basic if else pattern.
Master if-else statements in C# by exploring relational expressions, braces on the same line, and indentation to improve readability, with gross pay calculations for hours worked.
Learn to implement a sign function in C# with nested if-else statements instead of independent ifs, emphasizing indentation and the else pairing with the nearest if.
Master the if-else-if structure in C# programming by replacing nested ifs with multiple relational expressions and clear statement blocks. Learn how this approach yields readable, maintainable code.
Demonstrate the if-else-if chain in C# to convert a numeric grade into a letter grade. Prompt for input and map 90–100 to A, 80–89 to B, others to F.
Create a c# .net q&a exercise that implements a three-try guessing game with the answer watson, using nested if-else and console read line prompts.
Learn to build a simple calculator in c# .net using a pair of operands and an operator, with if-else logic handling addition, subtraction, multiplication, division, and invalid input.
Explore repetition in C# using the while and for loops, illustrated by a savings account example that computes balance over years, highlighting code efficiency and loop purpose.
Demonstrate the while loop syntax in C#, detailing the loop control variable, relational expression, and statement block, using a balance example with yearly increments and progression visibility.
Learn count controlled while loops in C# .NET by summing the first 10 integers and modeling balance growth to 5000 at 2 percent, highlighting loop control variables and increments.
Learn how to implement event controlled (sentinel) loops in C#, using sentinel values such as negative one or zero to end input, and compute averages with total and count.
Learn how the for loop differs from while loops by running a fixed number of iterations, with initialization, test, and modification inside the for header, plus a sum example.
Learn to use for loops beyond counting by one, including incrementing by multiple steps to print odds and counting down to reverse a string with substring and zero-based indices.
Examine for loop patterns in C# by moving initialization or increment outside the loop, and using braces or a null statement. Learn why the standard form enhances readability and maintainability.
Learn how break and continue govern loop flow in C# by exiting a while or for loop, returning to the top for the next iteration.
Rewrite the jeopardy question and answer program using while and for loops with three tries, a break, and simplified nested if statements to improve readability.
Build a looping calculator with a while loop that prompts for two operands and an operator, performs +, -, *, or /, and asks yes or no to continue.
Define user defined methods in C# using static, a return type, and parameters, then return results and call the square method from the main program.
Define static double methods for Fahrenheit to Celsius and Celsius to Fahrenheit conversions, then consolidate into a single convert method using a scale parameter.
Explore predicate methods in C# .NET that return boolean values, such as is even and is vowel. Learn how modulus checks even numbers and character tests identify vowels or consonants.
Learn about the void method in C#, a method that doesn't return data. Define a heading with static and parentheses, with no parameters, and use it in the main program.
Explore value parameters by swapping two integers with a void method, and compare pass by value to pass by reference using the ref keyword and reference parameters.
Create two example methods in C# that calculate a final cost after a discount and compute a tip using a tip_calc method, with static double return types and console input.
Create a calc method with three parameters to perform calculations, returning results instead of console output. Move code from main into the method to simplify the program and enable reuse.
In this C# for Beginners tutorial course, you can learn this powerful object-oriented programming language so closely tied to Microsoft .NET and see why it is such a great platform for creating rich applications. Professor Mike McMillan goes through the fundamentals of the language structure, and gradually lays the groundwork for you to build your own apps.
In 114 separate tutorials, Mike gives you a solid working knowledge of object-oriented programming, even if you’re completely new to coding. He demonstrates how to use variables and data types, objects and classes, arrays, inheritance and polymorphism and distinguishes how working in C# differs from other types of code. Once you gain your confidence in the underlying areas, you’ll be ready to complete the functional To-Do List app that is integrated into the course.