class GenericClass<Type1 , Type2 , Type3>
public GenericClass(Type1 property1 , Type2 property2 , Type3 property3 )
this.Property1 = property1;
this.Property2 = property2;
this.Property3 = property3;
public static Thing Display<Thing>(Thing obj)
public static void Main()
GenericClass<string, int, int> StudentDetail = new GenericClass<string, int, int>("Atul",22,95);
Console.WriteLine("Details Of Student :");
Console.WriteLine("Name : " + StudentDetail.Property1);
Console.WriteLine("Age : " + StudentDetail.Property2);
Console.WriteLine("Marks : " + StudentDetail.Property3);
GenericClass<string, float, float> AccountDetails = new GenericClass<string, float, float>("Sarthak",12150007898675,2000560);
Console.WriteLine("Details Of Bank Account :");
Console.WriteLine("Name : " + AccountDetails.Property1);
Console.WriteLine("Account Number : " + AccountDetails.Property2);
Console.WriteLine("Amount : " + AccountDetails.Property3);
GenericClass<string, string, string> Animals = new GenericClass<string, string, string>("Cat","Dog","Horse");
Console.WriteLine("List Of Animals :");
Console.WriteLine("1. " + Animals.Property1);
Console.WriteLine("2. " + Animals.Property2);
Console.WriteLine("3 " + Animals.Property3);
int PhoneNumber = 967563202;
Console.WriteLine("Contact Number is " + GenericMethod.Display(PhoneNumber));
string name = "SoftProdigy";
Console.WriteLine("Company Name is " + GenericMethod.Display(name));