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 8832039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:26:31+00:00 2026-06-14T08:26:31+00:00

I have my generic class and two methods that accept as argument a delegate

  • 0

I have my generic class and two methods that accept as argument a delegate (generic or not)

public sealed class MyClass<TResult>
{
   public MyClass ContinueWith(ThreadInfo.Parameterized arg)
   {
   }

   public MyClass<TResult> ContinueWith<TResult>(ThreadInfo<TResult>.Parameterized arg)
   {
   }
}

Where:

public sealed class MyClass
{
}

I have the Compiler Warning (level3) CS0693 but if I remove <TResult> from the second method:

public MyClass<TResult> ContinueWith(ThreadInfo<TResult>.Parameterized arg)

I can’t use this method anymore, if I try I get a compiler error because the compiler thinks I want to use the first method.

How can I solve this problem?

  • 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-14T08:26:33+00:00Added an answer on June 14, 2026 at 8:26 am

    Well it sounds like you really want:

    public MyClass<TResult> ContinueWith(ThreadInfo<TResult>.Parameterized arg)
    

    In other words, using the TResult parameter declared at the type level.

    If you really want it to be a generic method (i.e. introducing a new type parameter) you have to give it a different name:

    public MyClass<T2> ContinueWith<T2>(ThreadInfo<T2>.Parameterized arg)
    

    (It’s possible that you may want to return a MyClass<TResult> here, or something similar – we don’t really know what you’re trying to achieve, which makes it hard to give detailed help.)

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

Sidebar

Related Questions

I have two generic save methods in a repository class: public void Save<T>(T entity)
I have a Generic Class Factory class that has two methods one utilizes the
I have a Generic Base Class that I want to allow one of two
I have a generic java class that stores comparables: public class MyGenericStorage<T extends Comparable<T>>
I have a generic class that needs to limit an enum depending on the
I have a generic class that takes a type T . Within this class
I have a generic class NamedValue<TValue> : public class NamedValue<TValue> { public string Name
If say I have some generic class, for example: public class Attribute<T> { }
I have a generic class that represents a document that can be of currently
Can I create a generic method that accept two types. The attributeType and ts_attributeType

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.