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

  • Home
  • SEARCH
  • 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 8407655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:25:34+00:00 2026-06-09T23:25:34+00:00

I’m using .Net Framework 3.5 . I need something like a Tuple , but

  • 0

I’m using .Net Framework 3.5.

I need something like a Tuple, but how I don’t have it, I created my own Tuple using this

So, I have

public class Tupla<T1, T2>
        {
            public T1 First { get; private set; }
            public T2 Second { get; private set; }
            internal Tupla(T1 first, T2 second)
            {
                First = first;
                Second = second;
            }
        }

        public static class Tupla
        {
            public static Tupla<T1, T2> New<T1, T2>(T1 first, T2 second)
            {
                var tuple = new Tupla<T1, T2>(first, second);
                return tuple;
            }
        }

Then, I need to use something like a Dictionary with some other code mine.
For each Key, I need to return a Tupla, filled with values.

So, I created my class

public class ParametrosMultiples : Dictionary<String, Tupla>
    {

    }

But It doesn’t recognize my Tupla class.
As far as I can see, I can use custom clases (and not only types, like String, Int32, etc)

The error I get is

type or namespace name ‘Tupla’ could not be found (are you missing a
using directive or an assembly reference?)

But they are in the same namespace, even in the same .cs (I only mention that to make sure that is in the same namespace, because we use only one namespace for .cs for convention)

If I can’t use that Tupla, how I can retrieve two values from a Key?

Edit:

To show how I got my class:

namespace ReportesWeb.WebApp.App_Shared
{
 public class ParametrosMultiples : Dictionary<String, Tupla<Int32, Int32>>
 {
 }

// here goes the Tupla code showed above, the two classes

}

Edit2:

I have removed the Static Tupla (leaving only One Tupla Class) and still get the same error, so is not a problem of conflict with the names

  • 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-06-09T23:25:35+00:00Added an answer on June 9, 2026 at 11:25 pm

    You need to specify the generic parameters of your Tupla class.

    public class ParametrosMultiples : Dictionary<String, Tupla<type1,type2>>
    {
    
    }
    

    Though the error you are getting seems to suggest that this class is either in a separate assembly that has not been referenced, or (if it is referenced or is in the same assembly), that you have not imported the namespace it lives in into the class that needs to use it with a using directive.

    You also seem to have two separate classes (a static and a “normal” one) with the same name – Tupla. This will certainly cause a naming conflict. Consider changing the name of one of them, or incorporate the functionality into a single class.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I have some data like this: 1 2 3 4 5 9 2 6
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I don't have much knowledge about the IPv6 protocol, so sorry if the question

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.