C#

C-Sharp

Using Enumeration in C#

Submitted by phuc.works on

Objective

Many things in the real-world conceptually represent enumerations: the days of the week, months of the year, seasons, oceans, and compass directions, to name a few. In this tutorial we will show you how to use Enumeration in C# language.

Let's go

Definition of Enumeration

Iteration Statement in C# Language

Submitted by phuc.works on

Objective

In this tutorial, we will show you how to use some type of loops in C# language to control the flow of program.

Let's go

In many cases you want to repeat a piece of code multiple times. When you want to repeat code, C# language provides you a number of iteration statements. Iteration statements can execute a block of code zero or more times. Each execution of code is a single iteration.

While statement

Selection Statement in C# Language

Submitted by phuc.works on

Objective

In programming language, selection statement is very important. With selection statement, you can control the flow of program, and produce a valid output. This section will guide you how to use some selection statements in basic.

Let's go

Selection statement enable you to execute specific blocks of code based on the results of a condition. Here we have two basic selection statement: If statement and switch statement.

If statement

Converting Data Types in C# Language

Submitted by phuc.works on

Objective

This tutorial will explain you to understand how and why a conversion of data type occur in C#. Understanding the conversion will help you to avoid error and lose data when operation happen.

Let's go

When you copy a value from one variable to another variable, a conversion must occur. Also when you want to do a operation on two difference data types, a conversion might also need occur. There are two types of conversion: implicit and explicit conversion.

Implicit Conversion

Understanding C# Language

Submitted by phuc.works on

Objective

In this tutorial, you will understand some basic components in C# Language include:
  • Types in C# Language
  • Variables and Constants
  • Identifier and Keywords
  • Statements and Expression
  • Class

Let's go

In a C# program, we will usually see some basic components like variable, expression, keywords, class. Let's start with all of them to investigate what they are and how to use these components.

Types