This program shows the difference between Generics and Non-Generic . It checks the performance of Generics. Generics are faster than Non-Generics it takes less time to add and retrieve any type of values. Below program gives the demonstration on performance and shows how powerful is Generics.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
namespace GenericsPerformance
{
class Program
{
static void Main(string[] args)
{
NonGenericMethod();
GenericMethods();
}