1

Possible Duplicate:
What is generics in C#?

public class MyNewClassMapper < EntityContainer, ModelContainer > 
   : BaseClassContainerMapper < EntityContainer, ModelContainer >
{

}

I have the above code in my app. Could not find the link in MSDN which explains about the class declarations shown above. Added white space around for each angle brackets to make this post readable. Please help. Smith

Community
  • 1
  • 1
LaysomeSmith
  • 661
  • 2
  • 6
  • 14

3 Answers3

1

This is a generic class MyNewClassMapper that has generic type parameters EntityContainer and ModelContainer and inherits from generic class1 BaseClassContainerMapper with these same parameters.

1 Could also be an interface, though it doesn't look like it in this case, based on name.

Branko Dimitrijevic
  • 50,809
  • 10
  • 93
  • 167
0

The MyNewClassMapper<EntityContainer, ModelContainer> is inherting from BaseClassContainerMapper < EntityContainer, ModelContainer >

the <EntityContainer, ModelContainer> are the type arguments

Please read more on information for Generic classes http://msdn.microsoft.com/en-us/library/sz6zd40f.aspx

HatSoft
  • 11,077
  • 3
  • 28
  • 43
0

It is defining a class (MyNewMapperClass) that is derived from a base class (BaseClassContainerMapper).

The classes themselves are used to map one object type to another.

Burb
  • 61
  • 4