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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:16:50+00:00 2026-06-18T19:16:50+00:00

I want the second calling style should be similar to first calling style. Please

  • 0

I want the second calling style should be similar to first calling style. Please see the details in my code. Any help is really appreciated.

Here is the code I am using.

// Calling Style of First Method

            var source = db.ThinkFeeds.Single(tf => tf.ID == 1);
            var target = new MyProduct.UIEntities.ThinkFeed();
            TypeConverter.ConvertBlToUi(source, target);

//Calling Style of Second method. Its really a weird calling style.

        var source = MyProduct.UIEntities.Book.GetBookByID(1);
        var target = new MyProduct.DTOEntities.Book();
        TypeConverter.ConvertUiToDto<MyProduct.UIEntities.Book, MyProduct.DTOEntities.Book, Book>(source, target);

//First Method

    public static void ConvertBlToUi<TBl, TUi>(TBl entitySource, TUi entityTarget)
    {

    }

//Second Method

    public static void ConvertUiToDto<TUi, TDto, TEntity>(TUi uiEntity, TDto dtoEntity)
        where TDto : DTOEntities.MyProductDTO<TEntity, TDto>
        where TEntity : EntityObject
    {

    }
  • 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-18T19:16:51+00:00Added an answer on June 18, 2026 at 7:16 pm

    You can’t. Generic Methods, type inference:

    The compiler can infer the type parameters based on the method arguments you pass in; it cannot infer the type parameters only from a constraint or return value. Therefore …

    The first style you’ve shown is using type inference, but it’s just a convenient shorthand. There are times (as here) where type inference cannot work, and so you have to supply the type parameters explicitly.

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

Sidebar

Related Questions

I'm calling some JavaScript from within my PHP code, but I want the second
I want to get 'second' in the following sample web address. http://www.mywebsite.com/first/sedond/third.html first can
I want to select the second <p> tag and style it within a itemize
I want call the following portion of code every second?? I have tried the
I want to do some processing before calling the second constructor. For example: class
<style type="text/css"> #second{ display:none; } </style> On mouse event I want to pass id's
I want to assign a resource I already have a second name, similar to
I want a second Activity to use the DropboxAPI object (mApi here) and invoke
I am writing a function with two arguments and I want the second argument
I have a problem about div position relative alignment. I want the second div

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.