ThreadStart and ParemeterizedThreadStart

ThreadStart

A ThreadStart is a delegate defined in the System.Threading namespace that represents the method that executes on a Thread.

Threads are lines of executions within a process and allow us write concurrent programs.

To be able to do this...

Introduction to Threads in C#

Towards the end of the 20th century, computers could already work with several programs simultaneously. This is normally called multitasking.

However, only one computing unit had to be executed at a given time. So the risk was that one program could monoplize the...

Years back, threads were implemented so isolate programs. In the early days, for example of Windows Version 3, Cooperative Multitasking was used.

With this technique, the Operating System executed all programs on a single execution loop.

The risk was that if one program encountered an error su...

C# Threading - Race Condition

Implementing Threads in applications is not an ardous task.

Tasks can divided implemented in independent threads and the threads can be scaled along with the number of CPU cores.

The problem comes when those threads need to interact with each other. And this is...

Cil

CIL

  • Stands for Common Intermediate Language.
  • Sits above .NET language.
  • Compilation of a typical C# class results into a .exe assembly file containing:

    • Manifest.
    • CIL instructions
    • Metadata describing the type.
  • .NET aware languages do emit CIL code and not platform specific instructio...

Introduction to Classes

Support for classes and objects(created from those classes) is the core construct of any C# program.

And indeed is what makes C# an object-oriented programming language.

Classes are templates for Object creation. Classes allow us create larger more organized programs th...

A class is a data structure that allows you to store data and execute code.

C# provides class as a construct that allows us create our own custom types.

A class contains data members and function members.

  1. Data Members - Store data associated with the class of an instance of the class. They...

C# Windows Forms : Labels

C# provides us with the Label class that represents a standard Windows Label.

This class obviously belongs to System.Windows.Forms. ```c# namespace System.Windows.Forms


This namespace itself is defined in the `System.Windows.Forms.dll`.
```c#
Assembly System.Wind...

C# Predefined Types

There are 16 predefined types in C#. These types can be divided into:

  1. Simple Types(13)
  2. Non-Simple Types(3)

All these predefined types are in lowercase characters.

The C# predefined types map directly to underlying .NET Base types.

The C# names are the aliases for thes...