The built-in data type in C# is called primitive data types. Here we are giving you the range of most commonly used primitive data types in C#. Data Type Description Size (bits) Range int …
Read More »Basics of C#
The Value Type In C#
Creating Fields and Using Initializers The first type of class member we’ll take a look at is the field, also called a data member.Outside any method, A field is just a class-level variable, outside any …
Read More »Methods & Formal Parameters in C#
Methods When we want to create a method with in the class then it’s important that the method can be declared with access modifier. Declaring a method public makes accessible outside an object whereas declaring …
Read More »Operators & Variables In C#
C# has a number of standard operators, taken from C, C++ and Java. Most of these should be quite familiar to programmers; the less common ones are enclosed elsewhere. Standard operators list are given …
Read More »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 …
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 …
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 …
Read More »Using return statements in C#
If you want a method to return information (means its return type is not void). You must write a return statement inside the method. You can do this by using the keyword return followed by …
Read More »Scope of the Variable in C#
The scope of a variable is simply the region of the program in which that variable is usable. Scope applies to methods as well as variables. The scope of an identifier (of a variable or …
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 …
Read More »