Contenido del Curso
Advanced C# with .NET
Advanced C# with .NET
1. Introduction to Desktop Development with .NET
Implementing Generic Classes
The basic syntax for implementing a Generic class is as follows:
Here T1, T2, ..
represent the type parameters.
We can create a new instance of a generic class using any of the following syntax:
index
We can use the type parameters anywhere inside the class body where a data type is applicable. For-example, we can use the type parameter(s) to:
- Create class attributes or properties
- Specify method argument types
- Specify method return types
¿Todo estuvo claro?