0

Hello,

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

However, I want to know how can I access Resource file from a Class Library ?

I will appreciate if you can send me a code sample!

Thank you for your help

Paul

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by paulnamroud
0

Yes the resource should be part of the Class Library.

As for now, I can do the following where I have only only Resource file Resources.resx: LibAEM.Properties.Resources.ResourceManager.GetString("RecordType_Missing").ToString() where LibAEM 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_GlobalResources (e.g. App_GlobalResources/CCustmomers.resx or App_GlobalResources/CCustmomers.fr.resx ... ) . And we can acces the resouces files by doing the following: Resources.CCustomers.FirstName_Missing.ToString()


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

Thank you

Edited by paulnamroud: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.