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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:26:16+00:00 2026-06-11T09:26:16+00:00

Is it advisable to use a .resx file to store common string references in

  • 0

Is it advisable to use a .resx file to store common string references in a business layer class library? I typically only ever see these been used in the presentation layer.

  • 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-11T09:26:18+00:00Added an answer on June 11, 2026 at 9:26 am

    One option to be to have a separate project in your solution, which has all the resx files for your whole solution. You can then add it as a reference to your business layer. In the Resources Project, you can write a wrapper around .net ResourceManager class, to return the resource value for your key. Something on the lines of:

    public class ResourceService : IResourceService
    {
        public ResourceService() {}
    
        public GetResourceValue(string resourceFileName, string resourceKey)
        {
             var resourceManager = new ResourceManager("Myresources", Assembly.Load("MyResourcesProjectName"));
             return resourceManager.GetString(resourceKey);
        }
    } 
    

    Then you can use it from you business layer as:

    var resourceService = new ResourceService();
    var resourceValue = resourceService.GetResourceValue("MyResources", "ResourceKeyName");
    

    I did not have time to test the code, I have written on the fly, but it should give you the general idea. IMO, there is nothing wrong in having the resx files in a separate project.
    Another way of approaching it, is to have .resx file in places where they are used. I find the separate project idea better, because that way, you can create separate folder for each type of language, and store locale specific .resx files in it.

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

Sidebar

Related Questions

Is it advisable to use singleton pattern in wcf application?. I have ServiceResponse class
It seems that it is not advisable to use <meta http-equiv=REFRESH CONTENT=3;url=url> for redirects
Is it possible (or even advisable) to use a PriorityExecutorBasedEventDrivenDispatcher with a TypedActor, in
I've read that system(pause) is slow and not advisable to use. Is there any
Is it advisable for my own DAO class to throw a SecurityException in its
Is it advisable to use a handler to display Images ? the issue is
Can someone advice me why it's more advisable to use Web Deployment Package over
Is it advisable to use Session variables to pass data between aspx pages on
Is it advisable not to use iterator.hasNext() in looping over an iterator? For example
Is it advisable to use arrays in Javascript using tens of thousands of indexes?

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.