Generics Baseball Sample Scores a Hit

Readers chime in on Dan Fergus' article on generics, including the whereabouts of a missing file.

Generics Baseball Sample Scores a Hit
I just received my February issue of Visual Studio Magazine, and was pleased to see an article by Dan Fergus on generics ["Implement Custom Generic Collections," VSM February 2007]. This is an interesting topic because generics are a "gray" area for many programmers like me.

I especially liked the article's reference to the many demos that attempt to cover complex topics, but have little or no real-world value. I also liked the idea of using baseball players and statistics for the code sample, but I'm sure there are many people wondering what a slugging percentage is.

Frank Ansanitis
Springfield, MA

For the record, slugging percentage is a baseball term that measures the power of a given hitter. It is obtained by dividing the total number of bases per hit (one for a single, two for a double, three for a triple, and four for a homerun) by the number of at bats a player has.—Eds.

I'm writing to you in reference to the recent article in VSM by Dan Fergus, "Implement Custom Generic Collections" [VSM February 2007]. I have been a classic VB programmer for the last 12 years, and I have finally made the jump to VB.NET, so I'm reading anything I can get my hands on to help with the transition.

I must say this article has been an immense help to me. There's so much to the Framework that it's overwhelming trying to find all the things that it can do. So it was gratifying and eye opening to see an article that brought so many aspects of the Framework to light.

I ran into one issue, however. I tried my best to re-create all of the code in your article without downloading the source code, but hit a wall. So I broke down and downloaded the source, only to find that the online source code for the article was incomplete. I'm right in the middle of this code, so seeing the full solution would help me greatly understand its usefulness and how to best take advantage of it.

Thanks for such a great article. It's really helped me get a better grip of the kinds of things that are possible with the .NET Framework.

Mike Issakian
received by e-mail

First, let me say that Dan Fergus' article that covers generic collections in the February issue of VSM ["Implement Custom Generic Collections," VSM February 2007] is extremely good. I've been looking for something like this for a long time.

However, when I try to download the code, the solution file is missing the project files. I downloaded it twice just in case something was messed up. If you happen to have the source code for the article handy, I would appreciate it if you would send it to me.

Randall Sexton
Knoxville, TN

Oops! As we mentioned in the last issue, we are in the process of upgrading our Web site and some things are bound to fall through the cracks. This was one of those cases. The initial code posting left out a couple essential files. The online file has since been updated to include the full solution. You can access the full code file by visiting and entering the article's Locator+ code: vs0702df. If you experience any problems accessing the site, feel free to email the editors at for any desired code samples or other issues, and we'll see that the site is fixed or you are otherwise provided with missing code. We appreciate everyone's patience, and look forward to your reactions to the improved Web site service overall.—Eds.

comments powered by Disqus


  • Visual Studio Code Dev Team Cleans Up

    The Visual Studio Code development team focused on some housekeeping in the October update, closing more than 4,000 issues on GitHub, where the cross-platform, open-source editor lives.

  • ML.NET Model Builder Update Boosts Image Classification

    Microsoft announced an update to the Model Builder component of its ML.NET machine learning framework, boosting image classification and adding "try your model" functionality for predictions with sample input.

  • How to Do Naive Bayes with Numeric Data Using C#

    Dr. James McCaffrey of Microsoft Research uses a full code sample and screenshots to demonstrate how to create a naive Bayes classification system when the predictor values are numeric, using the C# language without any special code libraries.

  • Vortex

    Open Source 'Infrastructure-as-Code' SDK Adds .NET Core Support for Working with Azure

    Pulumi, known for its "Infrastructure-as-Code" cloud development tooling, has added support for .NET Core, letting .NET-centric developers use C#, F# and VB.NET to create, deploy, and manage Azure infrastructure.

  • .NET Framework Not Forgotten: Repair Tool Updated

    Even though Microsoft's development focus has shifted to the open-source, cross-platform .NET Core initiative -- with the aging, traditional, Windows-only .NET Framework relegated primarily to fixes and maintenance such as quality and reliability improvements -- the latter is still getting some other attention, as exemplified in a repair tool update.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events