How to access Resource file from a Class Library ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paulnamroud
    New Member
    • Sep 2006
    • 15

    How to access Resource file from a Class Library ?

    Hello,

    I'm building a generic Class Library that I will use it in all my projects.

    As for now, I can do the following where I have only one Resource file Resources.resx: LibPublic.Prope rties.Resources .ResourceManage r.GetString("Re cordType_Missin g").ToString () where LibPublic is the name of my Class Library.

    I have already worked on a Website Project where we can create our classes under App_Code Folder (e.g. App_Code/CCustomer.cs), and then we can create all related Resouces File under App_GlobalResou rces (e.g. App_GlobalResou rces/CCustmomers.res x or App_GlobalResou rces/CCustmomers.fr. resx ... ) . And we can acces the resouces files by doing the following: Resources.CCust omers.FirstName _Missing.ToStri ng()


    So I would like to know if there's a way to have a resource file for each class inside my Class Library (LibPublic) or something similar to what we have in a Website Project ?

    Thank you
    Paul
Working...