Category Archives: C# Tutorial

C# Generic Stack<T> Tutorial with Programming Example

In this chapter you will learn

  • What is Generic Stack<T> in C#?
  • How to Initialize Generic Stack<T> in C#?
  • Programming Example

What is Generic Stack<T> in C#?

Stack is based on Last In First Out [LIFO] mechanism. It is required when you need to access recently added item Read More.


C# Generic Queue<T> Tutorial with Programming Example

In this chapter you will learn:

  1. What is Queue<T> in C#?
  2. How to initialize it?
  3. Understand C# Queue with Programming Example

What is Queue<T>?

Queue Represents First In – First Out collection of objects. Let’s understand it with easy example. Take an example of line of ticket Read More.


C# Generic SortedList with Programming Example

In this chapter you will learn

  • What is Generic SortedList<TKey,Tvalue> Programming in c#?
  • How to write program using Sorted List in C#?

C# Generic SortedList represents a collection of key/value pairs that are sorted by key based on the associated IComparer<T> implementation. Read More.


C# Generic Dictionary Tutorial with Example

In this chapter you will learn

  1. What are Generic Dictionary Class?
  2. How to declare it?
  3. Programming Example

What are Generics Dictionary Class?

Dictionary is a collection of keys and Values. We bind values with keys and store them in dictionary and later that key is used for accessing Read More.


C# Generic Lists with Complete Programming Example

In this chapter you will learn

  1. What are Generic Lists?
  2. How it is different from Collection List
  3. Programming Example

What are Generic Lists

The Generic Lists are similar to arrays. You can add, delete, populate, sort Generic Lists. is a placeholder for data types and replaced by Read More.


C# Generics Programming

In this chapter you will learn

  • What are Generics
  • How to Write Generics Program in C#
  • Benefit of Generics in C#

What are Generics

In simple words, Generics are the that type of classes which has PalceHolder instead of datatypes. When you create generic classes you don’t specify its data Read More.


C# Polymorphism Practice Question

practicenote-01

Qu 1. Write a program of function overloading that has a function Convert() that accepts a value in parameter and convert them into string and print on screen.
Hint: Convert(int num);
Convert(Double num);
Convert(Fload num);
Qu 2. Write a program using Virtual and Override keyword that Read More.

Programming Example of C# Polymorphism

example

Qu 1. Write a program to save data to database. There should be a function Save() that accepts one, two or three values as parameter and then save that to database.
Answer

Output

No Data to Saved
Jack saved
Jack and 22 are saved on 19-11-2016
_

[do_widget Read More.


Dynamic Polymorphism in C# with Programming Example

dynamic_polymorphism
In this chapter you will learn:

  • What is Runtime Polymorphism?
  • How to implement it in program?

What is Runtime Polymorphism?

Runtime Polymorphism is also known as Dynamic Polymorphism, Late Binding, Method overriding etc. Whereas in static polymorphism we overload a function; in dynamic Read More.


Function Overloading Tutorial C# with Programming Example

function-overloading
In this chapter you will learn:

  • What is Function Overloading?
  • Function Overloading with Programming Example

Function Overloading

In function overloading, a function works differently based on parameters. A single function can have different nature based on number of parameters and types Read More.