TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Administrator
Tech Writer
2.2k
1.5m
Retrieving Resources at Run Time
Feb 21 2003 2:13 AM
Hi Everybody, This is first time I have tried my hands on assemblies.So I have written one Class library assembly"ClassLibrary1" and I have embedded one resource file (Icon) in it using ResEditor. Now I have added this assembly in my application but when I try to retrieve that Icon its gives me exception ********** System.Resources.MissingManifestResourceException: Could not find any resources appropriate for your culture or the neutral culture in your assembly. baseName: ClassLibrary1.first Code I have written is as follows : __________________________________________________________________________ using System.Resources; using System.Reflection; using ClassLibrary1; private ClassLibrary1.Addition1 lib = new ClassLibrary1.Addition1(); private void Form1_Load(object sender, System.EventArgs e) { ResourceManager myManager = new ResourceManager ("ClassLibrary1.osho",Assembly.GetExecutingAssembly()); System.Drawing.Icon myImage = (System.Drawing.Icon)myManager.GetObject("osho"); int a=3; int b = 3; textBox1.Text = lib.sum(a,b).ToString(); } ___________________________________________________________________________ Application runs fine when I try to retrive string only but gives exception when I try to retrieve image from assembly. Has anyone come across this kind of problem ? Let me know what fundamental mistake I am doing here ? Thank you C_sharpkid
Reply
Answers (
0
)
Converting string to byte
Web Application accessing SQL on remote server, returning blank web page