andrew67
asked on
List<Classname> method()
Hi all im still in the process of learning c#.net and ive come accross this coding
public List<EmployeeDetails> GetEmployees()
{ ....... }
can anyone tell me why <EmployeeDetails> is inside <> and what does it mean having it inside the <>
I dare say its really easy and simple like all things if you already know
thanks
public List<EmployeeDetails> GetEmployees()
{ ....... }
can anyone tell me why <EmployeeDetails> is inside <> and what does it mean having it inside the <>
I dare say its really easy and simple like all things if you already know
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
List is similar to an Array , by default we will declare array of Type say int , double .. here the list is similar to the collection like array except that this is generic list which can accommodate any defined Datatype or default type or user defined object or built in objects
say
List<int> will hold integer values
List<string> will store string values
similarly List<EmployeeDetails> will hold object of Type 'EmployeeDetails'
say
List<int> will hold integer values
List<string> will store string values
similarly List<EmployeeDetails> will hold object of Type 'EmployeeDetails'
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent really really appreciated
for more information check out these links........
http://weblogs.asp.net/cnagel/archive/2005/03/04/385077.aspx
http://en.csharp-online.net/Understanding_Generics%E2%80%94Creating_Generic_Delegates
http://www.codeguru.com/csharp/sample_chapter/article.php/c11789/
Cheers Dear,