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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:34:38+00:00 2026-05-24T17:34:38+00:00

My dilemma: I have a POCO: ReportSource that is generic. I have a user

  • 0

My dilemma:

  • I have a POCO: “ReportSource” that is generic.
  • I have a user control wrapping up some report building logic.
  • My user control defines a ReportSource property but it will ultimately be the job of the page that calls the user control to assign that ReportSource property.

How can I define the property in my user control without specifying a T? Btw, I tried (just for larks) to make the user control generic… That ended badly.

public ReportSource<T> ReportSource {get; set;}

(Note that I’ve tagged this as C# and VB.net… C# is my norm, but I’m having to deal w/ legacy… An answer in either is appreciated)

  • 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-24T17:34:38+00:00Added an answer on May 24, 2026 at 5:34 pm

    Could you move the T specific logic inside a non-generic ReportSource? This “delays” the need to specify T until the caller needs T specifically or until ReportSource needs T. In other words, ReportSource will have generic methods taking T or would otherwise encapsulate or hide T altogether.

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

Sidebar

Related Questions

I have a dilemma that I've encountered before. What's the best in terms of
I ran into an interesting dilemma today. I have a function that handles information
I have a dilemma that goes like this. I have a string that represents
I am developing app that has multiple skins and I have a dilemma on
My dilemma - I have a universal app that holds a lot of images
I have some dilemma about controller usage. Like usualy, router (dispatcher or front controller)
So here is my dilemma, I have a navigation controller that controls three views.
I have a dilemma where to store secret tokens that I receive from twitter.
I have a bit of a dilemma here. I have an app that has
I have come across a little dilemma that has stumped me for the last

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.