Hi, I am learning generics, I want to insert empname, empid and empsalary, I implemented this way
using System;
using System.Collections.Generic;
using System.Text;
namespace EmployeeDetails
{
public class Emp_Details
{
readonly string _EmpName;
readonly int _EmpId;
readonly double _EmpSalary;
public string EmpName
{
get
{
return _EmpName;
}
}
public int EmpId
{
get
{
return _EmpId;
}
}
public double EmpSalary
{
get
{
return _EmpSalary;
}
}
}
public class GenericClass<T>
{
List<Emp_Details> myEmpDetails = new List<Emp_Details>();
}
class Program
{
static void Main(string[] args)
{
}
}
}
Now I want to read n records, I mean user will input the number of records he wants to enter, and then one by one he will enter the employee details,
Ideas pls and how should I do