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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:37:33+00:00 2026-05-11T10:37:33+00:00

I am wrapping up an application where I am using a lot of Dictionary

  • 0

I am wrapping up an application where I am using a lot of Dictionary classes to store Function and Action delegates. I am now refactoring my project a bit and cleaning code. My question is where do or would you put your Dictionary classes in your project structure? Right now, they are located within the calling class source files but I was wondering if I should create a separate source file to store all my Dictionaries. I hope this is enough information. Please forgive me if it is not. Thanks.

  • 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. 2026-05-11T10:37:34+00:00Added an answer on May 11, 2026 at 10:37 am

    I would organize the dictionaries in the same way as the rest of the code; group related functionality together, and separate unrelated functionality.

    In addition, I’d look at how the delegation dictionaries are used. If your usage pattern is always to retrieve a delegate and immediately invoke it, then I’d wrap that behavior into a class with a ‘do-the-right-thing’ method. Then each such class can be named by the domain concept it represents.

    For example, if you had a dictionary which mapped US state abbreviations to a sales tax calculation, then you could wrap all of that into a class with a ‘compute sales tax’ method taking a state code and subtotal as arguments. The fact that it’s using a dictionary to look up the right computation scheme then becomes a hidden implementation detail.

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

Sidebar

Related Questions

I'm currently refactoring some code on a project that is wrapping up, and I
I am wrapping up an application using ASP.NET in Visual Studio 2008. I am
In my application,i have text view with long text. i need text wrapping like
In my application, there is a io-thread, that is dedicated for Wrapping data received
Still wrapping my head around Delegates and I'm curious: Is it possible to overload
I'm in early (pre-coding) stages of developing a mobile web application using jQuery Mobile
I'm developing and testing a little straight-forward client-server application using java (and scala). The
From what I have gathered, wrapping text around an image is possible using a
I'm writing a WPF User Control for my application, wrapping a ListBox and a
I am just getting started using JavaServer Faces and am having a bit of

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.