Making Sense Of Generic/Generics In .NET Applications And Environments
Often pitted to mean general, broad, common, basic, non-specific, or standard, these collections, classes, assemblies, ‘generalities’, refer to a class able to be strongly typed for a variety of different classes and applications (broader applications). They are variety, choice, options and flexibility (when used right!). For and in the .NET Framework environment they have implications, risks, rewards as well. So what are they and how are they used?
It forms part of the type system of the CLR, allowing definition of a type, with some specification details remaining non-specific or unspecified. Parameters and members are left out for example, allowing code to do so to meet needs and requirements of output, results or programming. Complex topic with may angles and applications (lots of exam questions pertaining to it too! Study them well!) They are found in the System.Collections.Generics namespace (dictionary, sorted, queue, list classes). They are implemented mostly to improve performance and enabling type safety. Using generics over object types gain you reduced run-time errors, no casting or boxing, resource-intensive processing and tasks. Know-how in creating, consuming generic types, using constraints, interfaces, constructors, types and more are all essential tools and skills to master.
Key Exam Points
- Use of Generic(s), Collections, Types in .NET Framework, broad and specific applications, contexts.
- Review the Fundamentals, input/Output and collections/Generics chapters, content and references, as well as overview, specifics and applications, contexts, practical uses. Built in and customized generic types, how to create and use them effectively when constructing classes and assemblies.
- For the exam, work your way through the provided, study examples for/on Generics and Collections, (see elsewhere), that help you to gain a better understanding and confidence in this topic and arena.
- Take the practice test questions and the mock-exam, Q&A (with solutions/answers), work-labs and exercises to prepare for theroy and hands-on, demonstrable, application-type questions.
Related Terms
Casting, Boxing, Unboxing, Collections.
This article is based on the 2nd edition of the Microsoft .Net Framework Application Training Kit with the purpose to help 70-536 Exam takers to succeed. I constantly look for ways to improve the content. Please leave a comment about this article or drop me a message if you would like to see changes for this site.





