Generic

using System; 
using System.Collections.Generic;

class Test
{
static void Main( string[] args )
{
Test t = new Test();
int[] integerArray = {1,2,3,4,5,6};
char[] characterArray = { 'J', 'O', 'Y', 'D', 'I','P' };
double[] doubleArray = {0.1,0.2,0.3,0.4,0.5,0.6};
Console.WriteLine( "Displaying the contents of the integer array:--" );
t.Display(integerArray);
Console.WriteLine( "Displaying the contents of the character array:--" );
t.Display(characterArray);
Console.WriteLine( "Displaying the contents of the double array:--" );
t.Display(doubleArray);
}

public void Display<>( GenericArray[] array )
{
for (int i = 0; i< array.Length; i++)
Console.WriteLine(array[i]);
}
}

Comments

Popular posts from this blog

IBM FileNet: Bulk Processing using JavaScript

DB2 Date Time Functions

File Net Insert Document