473,569 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to access Resource file from a Class Library ?

15 New Member
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
Jun 8 '11 #1
0 1666

Sign in to post your reply or Sign up for a free account.

Similar topics

6
13439
by: Null Reference | last post by:
Anybody here who can explain or point me to a link ? I wish to create a blank MS Access DB file programmatically using C# . Thanks, nfs
1
8972
by: Tim Mulholland | last post by:
I can't find a good solid example on how to access strings from a resource file. I know i need to create a ResourceManager object, and then call the GetString method on it. My problem is that if i try to access anything from a resource file other than one of the ones connected with a Form, it can never find it. So can someone just point me...
3
2747
by: Chua Wen Ching | last post by:
Hi there, I had applied this security permissions in my class library based on fxcop standards. Before namespace: using System.Runtime.InteropServices; using System.Security.Permissions;
3
10367
by: J.Marsch | last post by:
Hello all: I am trying to build a resource dll that will house icons, and I'm afraid that I'm not having much luck reading it. Can you lend hand (or just point me to a good primer). Here's what I've done so far: (VS.NET 2003/C#) 1. Created an empty project for the resource dll. Output type is class library.
0
1880
by: WebDevHokie | last post by:
Good day, I have a class library that I am creating and I want to use a resource file for each of the classes in the library. So I created a resource file (DataAccessLayer.resx) for each class (done from the Visual Studio IDE) and I then put the following code in my classes: ResourceManager o_ResourceManager = new...
2
6208
by: Al | last post by:
Hi, I have created a solution with two projects in it - a class library and a windows forms front end. I have added a resource file (Resources.resx) to the class library and filled it with icons. Does anybody know how would I go about using an icon from this resource file in the windows forms project? Thanks in advance, Al.
8
12061
by: John Dunn | last post by:
Since currently we aren't allowed to have compiled XAML files embedded in C++ apps I'm using Markup::XamlReader::Load to dynamically load XAML files. This works perfectly fine with external files but I'd like to be able to load a file specified in a .resx resource. I've added my .xaml file to the .resx and can load it in using...
0
1406
by: Sami Rehman | last post by:
Hi, I have got a C# Class library project 'MyCompany.Model.ValidationService' that deals with data validation. In this I have got a resource file 'RegularExpressions' to store regular expressions for email, tel no, SSN etc. Below is the code and associated error message Line1: ValidationResultList validationResultList = new...
1
15690
by: Steve Richter | last post by:
I am embedding an xml file in my class library assembly. In solution explorer I right click a folder, add , new item, xml file. then on the xml file I right click, properties, build action = embedded resource. build the class library, run the following code to access the XML as a stream: Stream cmdsStream =
12
5249
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.