Category Archives: C#

C# Namespace Guidelines

Let’s create some guidelines for documenting .Net Namespace. For example, let’s look at the System.Collections Namespace. What do we notice? Namespace – define the namespace using the following convention: System.Collections Namespace Purpose – describe the purpose of the namespace, for example:   The System.Collections namespace contains interfaces and classes that define various collections of objects, […]

What is a Statement in C#?

In C#, statements express the actions that a program takes. Common actions include Declaring variables Assigning values Calling methods Looping through collections Branching to another block of code The order in which statements are executed in a program is called the flow of control or flow of execution. This may vary every time that a […]

C#: how to write Hello World

The “Hello, World” program is traditionally used to introduce a programming language. Here it is in C#: using System; class Hello { static void Main() { Console.WriteLine(“Hello, World”); } } What’s the file extension? C# source files typically have the file extension .cs. How to compile? You can compile the program with the Microsoft C# […]