Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes.

.NET Framework 2.0 introduces a Triplet class which is used to hold 3 items. You can also hold a single or two items but the primary purpose is to hold three items. You can use it something like this:

 Triplet t = new Triplet();
        t.First = "Car";
        t.Second = "Engine";
        t.Third = "Wheels"; 


I think its pretty insane!

powered by IMHO


Posted on Wednesday, October 12, 2005 12:00 AM | Back to top

Comments on this post: Triplet class (Come on Now)

# re: Triplet class (Come on Now)
Requesting Gravatar...
This class has been around since 1.0, like the Pair class. It's used to make the ASP.NET ViewState generation more efficient. Adding two or three objects to the ViewState is a common scenario (e.g. a derived control will often want to add its own state plus the state of its base class = two objects). I don't think you'll find yourself using either class much unless you're an ASP.NET control developer.
Left by Joe on Oct 12, 2005 4:04 AM

Your comment:
 (will show your gravatar)

Copyright © Mohammad Azam | Powered by: