Arrays (Part 1): Introduction to arrays, declaring and initializing arrays
Welcome to our series on collections! We'll start with arrays, which are fixed-size collections of elements of the same type.
Welcome to our series on collections! We'll start with arrays, which are fixed-size collections of elements of the same type.
In this article, we'll explore more advanced array types: multi-dimensional arrays (like matrices) and jagged arrays (arrays of arrays).
Welcome to a new series on building your first .NET console applications! We'll start with the most fundamental building blocks of any interactive program: getting input from the user and displaying output. In C#, this is primarily handled by the Console.ReadLine() and Console.WriteLine() methods.
In this final article of the series, we'll see how to combine loops and conditionals to create more sophisticated programs. This is where the real power of programming begins to show.
Following our exploration of basic console I/O, this article delves into a crucial aspect of writing professional code: comments and documentation. Writing code that works is only half the battle; writing code that is easy for you and others to understand and maintain is just as important.
Following our exploration of operator precedence, this article introduces you to some of the most useful built-in types and methods that the .NET library provides. We'll focus on the Math, DateTime, and Random classes, which offer powerful, pre-defined functionalities.
In this final article of the series, we'll cover some common methods for working with collections and discuss best practices for choosing the right collection for your needs.
Following our exploration of Common Built-in Types and Methods, this article delves into conditional statements, specifically the if statement. This concept is essential for writing C# code that can make decisions and execute different blocks of code based on certain conditions.
In our previous article, we explored the basics of the if statement. Now, we'll expand on that by introducing the else clause, which allows us to specify an alternative block of code to execute when the if condition is false.
We've covered if and if-else. Now, we'll look at the if-else if-else structure, which is perfect for scenarios where you have multiple conditions to check.
Building upon our overview of .NET's diverse applications in The "What" and "Why" of .NET (Part 2), this article delves into two fundamental technical pillars of C# and the .NET platform: understanding C# as a compiled language and the critical role of type safety. These concepts are essential for writing robust, efficient, and maintainable .NET applications.
A Dictionary is a collection of key-value pairs. It's like a real-world dictionary where you look up a word (the key) to find its definition (the value).
Following our understanding of C# as a compiled language and the importance of type safety from Core Concepts the Base Class Library (BCL), which provides a wealth of foundational functionalities, and NuGet, the .NET package manager that allows you to tap into a vast collection of third-party libraries.
Following our exploration of advanced string manipulation, this article delves into the world of booleans and logical operations. The bool data type is the cornerstone of decision-making in C#.
Following our exploration of Variables and Assignment in C#, this article delves into C#'s numeric data types. Understanding how to work with numbers is a fundamental skill for any C# developer.
Following our exploration of C#'s numeric data types, this article delves into working with text using the string data type. Strings are fundamental to almost any application, and C# provides a rich set of features for working with them.
Following our exploration of the basics of C# strings, this article delves into more advanced string manipulation techniques, including string interpolation, composite formatting, and slicing.
LINQ (Language Integrated Query) is a powerful feature in C# that allows you to write expressive queries over collections.
While arrays are useful, they have a fixed size. List is a generic collection that provides a more flexible, dynamic array.
The break and continue statements allow you to alter the normal flow of a loop.
Welcome to the world of loops! Loops are used to execute a block of code repeatedly. The for loop is ideal when you know in advance how many times you want to iterate.
In this article, we'll explore nested for loops, which are loops inside other loops. This is a powerful technique for working with two-dimensional data structures or creating patterns.
The foreach loop provides a simple, clean way to iterate over the elements of a collection, such as an array or a list.
Unlike for loops, while and do-while loops are used when you don't know how many times you need to iterate. The loop continues as long as a condition is true.
Following our exploration of logical and bitwise operators, this article dives into a crucial concept that governs how expressions are evaluated: operator precedence and associativity. Understanding this "order of operations" is key to writing correct and bug-free code.
Following our exploration of comments and documentation, this article dives into the world of arithmetic operators in C#. These are the fundamental building blocks for performing mathematical calculations in your code.
Following our exploration of arithmetic operators, this article dives into comparison operators. These operators are the foundation of decision-making in C#, allowing you to compare two values and get a bool (true or false) result.
Following our exploration of comparison operators, this article dives into logical and bitwise operators. These operators allow you to combine boolean expressions and perform low-level manipulations of data.
Queues and Stacks are collections that enforce a specific order for adding and removing elements.
A HashSet is a collection that contains no duplicate elements. It's highly optimized for checking if an element is present in the collection.
Having explored the .NET BCL and NuGet ecosystem in Exploring the .NET Ecosystem Visual Studio or Visual Studio Code.
In Setting Up Your .NET Development Environment (Part 1), we installed the .NET SDK and chose an IDE (Visual Studio or Visual Studio Code). Now, in Part 2, we'll focus on the initial configuration of these IDEs for C# development, create our very first "Hello, World!" project within them, and take a brief look at their debugging capabilities. This will set the stage for writing and testing actual C# code.
The switch statement is an alternative to the if-else if-else chain for when you have multiple conditions to check against a single value.
Following our exploration of foundational programming concepts (or for our first article, initiating our journey into modern software development), this article delves into the "What" and "Why" of .NET (Part 1). This concept is essential for understanding the vast capabilities of Microsoft's versatile development platform and is a foundational element in modern software engineering.
<!--
Following our exploration of booleans and logical operations, this article delves into type conversion (casting). This is the process of converting a variable from one data type to another.
Following our exploration of type conversion, this article delves into the concept of null and nullable types in C#. Understanding how to handle the absence of a value is a critical skill for writing robust and reliable C# code.
Following our exploration of Your First .NET Console App: "Hello, World!" (Part 2), this article delves into Variables and Assignment in C#. This concept is essential for writing efficient and readable C# code and is a foundational element in modern .NET development.
After setting up your development environment in Setting Up Your .NET Development Environment (Part 2), it's finally time to write and run your very first C# .NET application! The traditional first program in any new language is "Hello, World!". In this article (Part 1), we'll focus on creating, building, and running this simple console application entirely using the .NET Command Line Interface (CLI). This approach helps solidify your understanding of the underlying tools before relying heavily on an IDE.
In Your First .NET Console App: \"Hello, World!\" (Part 1) - Using the Command Line, we successfully created and ran our first "Hello, World!" application using the .NET CLI. Now, in Part 2, we'll shift our focus to the C# code itself. We'll dissect the structure of the Program.cs file, understand the role of the Main method (even when it's implicit), explore the Console.WriteLine() method in more detail, and touch upon basic C# syntax elements like comments and string interpolation.