473,487 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trying to read a property value (from a loaded Assembly/Plugin)

2 New Member
Hello 2 all,

I have the following problem in finding the property value from the loaded assembly (control).

I am the following setup:

Language: C#
OS: WinXP
MVS 2005/2008
.NET 2.0 - 3.5

Written a base class called "baseOne" (on a separate Assembly), inside this I have a string property "myValue" (with get & set)

Written another class called "formOne" (on a separate Assembly) by referring to the "baseOne" class. On this formOne, have placed a listbox and on click of an item on the listbox, am trying to assign the selected value into the Property "myValue"

So far no issues.

On the main application, along with code for the form creation, have code to handle the form "Clicked" method.

Inside this click method, I have the following code:

Type senderType = sender.GetType();
PropertyInfo idInfo = senderType.GetProperty("myValue");
string id = String.Empty;
if (idInfo != null)
id = idInfo.GetValue(sender, null).ToString();

-- issue --
MessageBox.Show(id); //resulting blank

I tried to debug through the code, the property "myValue" value been retrieved from "baseOne" and not from the "formOne"!

Anyone? Would appreciate help on the issue...

*Hope it is not confusing, if so, would re-do the post
Apr 7 '08 #1
1 918
xsd
2 New Member
I have found out the problem/issue, myself.

My bad, I had two assembly files in two locations and all along, it was referred to the bad location. Once I have found the duplicate issue, and ran the main app. the result was flowing smoothly. - no issues.

Thanks for looking in.
(this is one of the good place for giving and taking answers)
Apr 9 '08 #2

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

Similar topics

0
1330
by: serge calderara | last post by:
Dear all, I have a really strange beaviour in my application. First of all I have a single plugin interface named IPlugIn which as been build in a separate project library named PLugin.dll...
0
1572
by: Greg Conely via .NET 247 | last post by:
I am creating a application that will be using plugins. I am doing this so that when I want to let this application work with another type of dbase system, I only have to write\install one plugin,...
3
964
by: jwalker | last post by:
I am loading some dlls for my application using reflection. These dlls are plugins as suggested in the MSDN article: http://msdn.microsoft.com/msdnmag/issues/03/10/Plug%2Dins/ (although I came...
4
12094
by: Josema | last post by:
Hi to all, Im searching a hand to solve an Exception that i get when i try to give the user to a gmail account... Any help would be appreciated.. Thanks in advance This is a piece of my...
2
21938
by: Ilkka | last post by:
I have created an C++ application with Windows Forms, ADO and SQL server 2005. Now I need to change something and started debugging the code. Then suddenly I receive an error. "An unhandled...
7
4674
by: rfinch | last post by:
Very new to this but using the MS working with dynamics CRM 3.0 book to run web application to retrieve lead records from CRM 3.0. Have followed the book instructions on page 380-382. But am...
12
1680
by: Ron M. Newman | last post by:
Hi, I can load an assembly using the Assembly.Load(....) However, I'd like dynamic loading of assemblies to be identical to putting an assembly reference in your VS2005 project. and yes, I...
7
13338
by: =?Utf-8?B?Sm9obi5ORVQ=?= | last post by:
Hi I have written a windows service in C# / .NET I have installed it and it's working fine on a couple boxes but on my XP box I get this error when I try to start it: Error 1053: The service did...
1
5477
by: Fredo | last post by:
I'm getting the following error when I'm running my application (application name changed for the example): Unhandled Exception: System.TypeLoadException: Method get_ImageFile in type...
0
6967
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...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7180
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...
0
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4870
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...
0
4564
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...
0
3076
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...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
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.