Basics of C#

Type Conversions in c#

Type conversion is a process of converting one type into another. Using C# type conversion techniques, not only you can convert data types, you can convert object types also. The type conversion in C# can be either implicit conversion or an explicit conversion.   If one type of data is automatically converted into another type …

Type Conversions in c# Read More »

Enums In C#

“The great power comes with a great responsibility.”   Enums are basically a set of named constants. They are declared in C# using the keyword enum. Every enum type automatically derives from System.Enum namespace and thus we can use System.Enum methods on our Enums.   Enums are value types and are created on the stack …

Enums In C# Read More »

Type-Safety in C#

At the first, what is type safe code and why is it relevant to secure programming? Type safety is certainly one of the most confusing aspects for somebody learning .Net. When .Net was released, it had a tag attached claiming that the programs developed in .Net are more stable when compared to programs developed using …

Type-Safety in C# Read More »

Control Statement in C#

C# uses two types of control statements: ? Conditional Statements ? Looping   Conditional Statements   In C#, there are two types of conditional statements: ? if statements ? switch statements   if statements   The first conditional statement is programmer’s favorite “if” statement. It has three forms:   1. Single selection 2. if-then-else selection …

Control Statement in C# Read More »