Как получить данные из arralist в C#?
его не dispalying данные,
его показывающая система.SampleApp3.коллекция
Что я уже пробовал:
namespace SampleApp3 { public class BaseEmployee { public int Id; public string Name; } public class Employee : BaseEmployee { public string Address; public Object Add() { Employee employeeDetail = new Employee(); Console.Write("Employee Id:"); employeeDetail.Id = int.Parse(Console.ReadLine()); Console.Write("Employee Name:"); employeeDetail.Name = Console.ReadLine(); Console.Write("Employee Address:"); employeeDetail.Address = Console.ReadLine(); return employeeDetail; } static void Main(string[] args) { ArrayList arraylist = new ArrayList(); Employee employeeDetails = new Employee(); while (true) { Console.WriteLine("Employee Record Management System\n"); Console.WriteLine("\n1)Add"); Console.WriteLine("\n2)Edit"); Console.WriteLine("\n3)Delete"); Console.WriteLine("\n4)Dispaly"); Console.WriteLine("\n5)Exit"); Console.WriteLine("\n Select opertaion"); int Option = int.Parse(Console.ReadLine()); switch (Option) { case 1: arraylist.Add(employeeDetails.Add()); //arraylist.Add(employeeDetails.Add()); break; case 4: foreach(Object obj in arraylist) { Console.Write(obj); } Console.Read(); break; } }