Chapter 13. Using Generics with J#

Throughout this book, the majority of the examples have used either C# or Visual Basic. These are certainly two of the more heavily used languages of the .NET platform. At the same time, the J# language also includes support for generics, and its generics nuances are certainly worth exploring. This chapter looks at how J# can be used with many of the generic constructs (classes, methods, and so on). It revisits some of the key generic concepts and explains how they take shape within the J# language. The main idea here is to explore the fundamentals of J# generics and provide some concrete examples of J# generics in action. Because many J# programmers are Java transplants, this chapter also points out some of the differences between the Java and .NET generics implementations. Overall, after looking at some of the sample code in this chapter, you'll likely discover that using generics with J# isn't all that different from the other languages of the .NET platform.

Get Professional .NET 2.0 Generics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.