Type Declaration

Generally speaking, if you take a look at languages like C, C++ and C#, you’ll notice this pattern: The source code for any C# executable (EXE) or dynamic link library …

Numeric Format Strings

In the previous section, we covered string placeholders and learned two implementation approaches. Beyond these two methods, C# also supports more sophisticated formatting rules. Basic Syntax for Format Placeholders 1. …

Console Text Output Operations

The Console Class Belongs to the System namespace, part of the .NET Base Class Library (BCL) Handles text read and write operations for console windows, with two core output methods …

The entry point of a program

The Main Method The entry point of a program Every C# program must contain a class with a method named Main. In the sample code shown earlier, this method sits …

Keywords

Keywords are character tokens that define the syntax rules of the C# language. A keyword is a set of built-in terms native to C#. These words carry special functional meanings, …

Identifiers

An identifier is a string used to name program elements such as variables, methods and parameters. It’s recommended to combine semantically meaningful English words to write self-documenting code (e.g. PlayersHand, …

Your very first C# sample program

Next up, we’ll walk through creating a C# console application using nothing more than the basic Notepad text editor. In this lesson, we’ll start by writing our introductory program manually …

C# and .NET

What Is C# C# was built exclusively for Microsoft’s .NET Framework platform and is pronounced “See Sharp”. Microsoft needed a unified, fully object-oriented integrated development framework to fix flaws in …