Link to home
Start Free TrialLog in
Avatar of andrew67
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

ASKER CERTIFIED SOLUTION
Avatar of Jon500
Jon500
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of apexpert
apexpert

it is collection of methods of Generics deligate. which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code.
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,
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'
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andrew67

ASKER

excellent really really appreciated