Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3977302
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:54:27+00:00 2026-05-20T04:54:27+00:00

As .net framework 4.0 supports Tuples. Tuple Class is not available in 3.5 But

  • 0

As .net framework 4.0 supports Tuples. Tuple Class is not available in 3.5 But Is there any way i can create my own class MyTuple in .net 3.5?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:54:27+00:00Added an answer on May 20, 2026 at 4:54 am

    Yes. You can create your own tuples. There isn’t anything hard about it. Here’s an example with a Tuple<T1, T2> and Tuple<T1, T2, T3>.

    public class Tuple<T1, T2>
    {
        public Tuple(T1 item1, T2 item2)
        {
            this.Item1 = item1;
            this.Item2 = item2;
        }
    
        public T1 Item1 { get; private set; }
    
        public T2 Item2 { get; private set; }
    }
    
    public class Tuple<T1, T2, T3>
    {
        public Tuple(T1 item1, T2 item2, T3 item3)
        {
            this.Item1 = item1;
            this.Item2 = item2;
           this.Item3 = item3;
        }
    
        public T1 Item1 { get; private set; }
    
        public T2 Item2 { get; private set; }
    
        public T3 Item3 { get; private set; }
    }
    

    And here is the static factory class for creating Tuple instances:

    public static class Tuple
    {
        public static Tuple<T1, T2> Create<T1, T2>(
            T1 item1, T2 item2)
        {
            return new Tuple<T1, T2>(item1, item2);
        }
    
        public static Tuple<T1, T2, T3> Create<T1, T2, T3>(
            T1 item1, T2 item2, T3 item3)
        {
            return new Tuple<T1, T2, T3>(item1, item2, item3);
        }
    }
    

    Now you can write the following:

    var myTuple = Tuple.Create(4, "oh yes baby");
    

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any libraries available that can help to change the look-and-feel of Desktop
Do I need to create a application pool which supports .net framework 4.0?
I know .NET Framework 4.0 is available as separate install but... Is .NET Framework
I wonder if C# (or the underlying .NET framework) supports some kind of generic
Any good logging libraries that support .NET compact framework?
I need a .NET that supports last in first out (LIFO). Is there one?
I'm looking for any database framework/library for .net which will act as a unified
The last release os ODP.NET already supports Entity Framework? Someone uses it? If the
I'm trying to find a unit test framework, for the .NET platform, that can
While going through features of .NET framework 4.5, I found that it supports RFC-compliant

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.