Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

How to find odd number in c #


In this tutorial I will show how to generate Odd numbers in c#. I have given two example first example is very simple. First example I have used simple for loop to find Odd numbers. Second example I have created a Boolean type function then used the function for finding Odd Numbers. Both the examples check reminder of a number. If the reminder not 0 then the number must be odd number.

How to find Odd number in c #

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

How to generate random number in c #


In this tutorial I will show how to generate random number in C# programming language. We have to use Random Class to generate Ran Random number. Next Method of Random class is used to generate random number. In this example I have used two argument fist argument takes min number and second argument takes max number. I have given another example to generate random number using loop and it will also give you clear idea about Random number generation in c sharp.

Generate random number in c# prgramming

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Nested For Loop Example in C Sharp


Dear viewers in this tutorial I will show simple nested for loop example in c sharp. When a loop performs within a loop is called nested loop. In this tutorial I have created two loops after creating first loop I have also created another loop within the first loops.

Simple Nested For Loop Example in C Sharp

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Store C sharp reference type in a List C#


Dear viewers in this tutorial I will show how to store reference type data into c sharp List. We know a list of item can be accessed by indexed and has many functions and properties. In this example I have created a class named Employee and created necessary properties. Now I have used List Add function to add Employee information. After adding Employee information I have also shown how to use properties and functions of List.

Store C Sharp reference type in a List C#

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Find number of items in a List C#


Dear viewers in this tutorial I will show how to count list item in asp.net C Sharp. In this example I have created list of country then I have found how many country are available in list. So for finding or counting a number of item in a List we have to use Count Property of List.

Count number of items in a List C#

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Concept about C # List


Dear viewers in this tutorial I will give concept about C # List. C # List is also known as generic type and we have to need to import System.Collections.Generic namespace .The main difference between ArryList and List is List dynamically resize but ArrayList does not resize dynamically List not only hold primitive type data such as byte, short, int, float, double, long ,char, bool, DateTime, string, object etc but also hold reference types and object instances. Hear I have given only two examples to understand clearly.

List example C #

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Custom Time formatting example C #


Dear viewers in this tutorial I will show how to format date and time using String.Format Method using ASP .Net C#. It can be said custom date and time formatting.In this example I have shown most common customizing date time pattern such as only time with minute using shorformat, time with minute and second using LongTime, LongDate with ShortTime, LongDate with Longtime, ShortDate with ShortTime, ShortDate with Longtime.

Custom Time formatting example C #

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Custom Date formatting example C #


Dear viewers in this tutorial I will show how to format date using String.Format Method using ASP .Net C#. It can be said custom date formatting . In this example I have shown most common customizing date pattern such as month with/without zero, month with/without partial digit , year with/without two digit and four digit.
<h1 style="color: #FF3300; font-family: Verdana; font-size: 22px; font-weight: bold;

Custom Date formatting example C #

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

String Format Example using ASP.Net C#


Dear viewers in this tutorial I will show how to format double type data using String.Format Method using C # .First example I have shown to format only two decimal number second example shown to format only two decimal number from floating number ,third example shown to format minimum number of digits before decimal point ,forth example shown to use thousands separator use zero and comma separator before an usual float formatting pattern.

Common String Format Method example C #

 

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Simple enum example in C Sharp


Dear viewers in this tutorial I will give a simple enumeration example .This example will give you a clear concept about enumeration in c# programming Language. C# enumerations are value data type that means enumeration contains only its own values inheritance is not possible. The enum keyword is used to declare an enumeration. A set of declared value can be assigned with enumeration. Initially the first enumerator is 0, and the value of each consecutive enumerator is increased by 1. In this example I have created a Holyday enum which content a set of day and used switch-case statement to find which day is holy day.

Simple Enum example in C #

 

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Nested switch-case statement example in C #


Dear viewers in this tutorial I will explain simple nested switch case statement in asp.net c #. In our practical working we need to take nested decision to find right result. The following example helps anyone to understand nested  switch case statement easily and clearly. The first switch case take decision the person is men or women then the next that means inner switch case take decision that the person married or unmarried.

Nested switch case statement example in C #

 

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Combined switch...case statement example in C #


Dear viewer’s in this tutorial I will show another switch...case statement that will also help you to build clear concept about switch...case statement .This switch...case statement falls throught first case label that means some of the case statements has been combined.The following example I have shown switch...case statement using customer type if customer type A or B then will be given same discount otherwise next discount will be acceptable .

Combined switch case statement example in C #

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp switch case statement Example


Dear viewer’s in this tutorial I will show simple switch-case statement so that you can understand about switch...case statement easily in c#. Switch statement is known as control statement. A switch statement includes one or more switch section each switch section contains one or more case labels followed by one or more statements. The first example is simple switch...case statement that has five switch sections. Each switch section has one case label, such as case 80, as case 70, case 60, case 50, and default. Switch statement default case is optional.

C Sharp switch case statement Example

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C# SUM ArrayList Element Example


Dear viewers in this tutorial I will show how to add single dimensional array values in c #. Some times we need to sum array List values so this example help any one to sum ArrayList values. Actually integer type arrayList values can be added .For Adding I have used Sum() Method and also used For Loop to calculate total value.

C# SUM Array List Element Example

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C# String Class Methods Example


Dear viewer's in this tutorial I will give some example of common c # string class methods. My Previous article I have given some list of common C # methods . Now I have given actual example using Console application for C # string class methods. Hope these example will give anyone to understand the use of common c # string class methods accurately.

C# String Class Methods Example

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp String Class Properties and Methods


Dear viewer's in this tutorial I will show common c# string class properties and methods. String Class length properties helps to count the number of character string .Besides The String class has many methods that help in working with the string objects. Clone(),CompareTo(),Contains(),ToLower() are the most common methods of string class.

String Class Properties and Methods

 

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp String Class Example


Dear viewer's in this tutorial I will explain how to use or work string data type in asp.net C#. string data type represents Unicode Characters . The string class provides a lot of methods and properties to work with strings type data.. String type data can be a combination of any letter , numbers, and character .To declare a string type data we need to use string key word .Double Quotes is used for enclosing the value of string type data.
<h1 style="color: #FF3300; font-family: Verdana; font-size: 23px; font-weight: bold;

C Sharp String Class Example

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

How to join two ArrayList collections in C#.


Dear viewer's I will show how to join two ArrayList collections in C#.For Joining two ArrayList collections we can use AddRange method of ArrayList class .Firstly I have created two two ArrayList collections that means same type data then using AddRange method I have combined with each other.

Join Two ArrayList collections

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

How to Use C Sharp Math Class


Dear viewers I will explain and give some example of common Math class’s methods. In our real project some times we need to do many typs of mathmetical operations so these operations can be easily implemented by Math class of System namespace. Most of Math class’s Method are static to implement.

C Sharp Math Class Example

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp ArrayList Property and Method


Dear viewers I will show some common Arraylist Property and Methods In C#. Common Arraylist Property are Capacity, Count, IsFixedSize, IsReadOnly, Item etc. Common Arraylist Methods are Add, AddRange, Clear, Contains, GetRange, Sort, Remove, RemoveAt,etc. I wil give some practical Arraylist example using console application.

C Sharp ArrayList Property and Method

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp ArrayList Example


Dear viewer's I will explain how to create ArrayList In C#. The mainf feature of ArrayList it dynamically increase at the time of adding elements . ArrayList is object type for this reason string, integer and other datatype can be added.For adding elements Add Method is used. Besides Add Method ArrayList has many other’s methods and properties.For using ArrayList System.Collections Namespace needs to be imported.

C Sharp ArrayList Example

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp Arrays Example


Dear viewers I will show how to declare c # array and use declared arrays. array is a group of variables containing values that all have the same type. Arrays are reference types that means as an array is actually a reference to an array object. A series of values that means same type values can be stored in Arrays. Array is accessed using one or more index numbers .At the time of creating array the numbers of element are specified the highest index is actually one less than the number of elements.

C Sharp Arrays Example

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp Logical operator Example


Dear viewer’s I will show common Logical Operator in C #. Logical Operator returns true or false by evaluating the given at least two values.Multiple conditions that means true or false result is performed on the basis of C # Logical Operator.

How to find Odd number in c #

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp Relational operators


Dear viewers I will show C Sharp relational operators. The relational operators allow two values or objects to be compared with each other .By using relational operators the values and objects are verified which one is greater or smaller than other. On the other hand C# relational operator’s return true or false based on comparison two values. If true then execute true block or false then execute false block.

C Sharp Relational operators

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp Arithmetic operators Example


Dear viewer’s I will show common C sharp arithmetic operators . Arithmetic operators are generally used to add , subtracts, multiply, divide numbers that means familiar arithmetic operations are done by using arithmetic operators. For performing arithmetic operation familiar mathematics symbol are used such as +,-,*,++,-- ,%.

How to find Odd number in c #

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

C Sharp Common Assignment Operator


Dear viewers I will show common c sharp Assignment Operator. Assignment Operator is basically used to assign values to a certain variables. I have shown most common Assignment Operator. The = is the most common assignment operator .A assignment operator not only assign number type data but also assign property, an event and indexer type element. Assignment operators right associative that means they are mainly grouped from right to left.

C Sharp Common Assignment Operator

See Details
Posted by :  Anwar Hossain
Category  :  asp.net c # basic tutorial

Simple for loop example in c sharp


Dear viewers I will show simple for loop example in c sharp. For loop is the most common and useful loop in c #. A block of statement can be executed using for loop. Iteration type variable is used in case of for loop. For loop is perfect for iterating number and have a termination to end.

For Loop example C #

See Details



Recent Article Headline

Article Category

Recent Article Category