473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Get reference to an object by its name(string) c#

Hi,

I vebeen digging couple of days internet to find some solid information. Unfortunately no luck. I have seen similar question I just want to append it here

I am trying to get a reference to an object by its name (string). Can we do this in C#. Please help.

Object objA = new object();

I wanna get reference to objA, by saying something like GetReference("objA")

I m parsing XML. XML have template of document. When I m parsing it I have to merge data that coming from objects. I want to pass objectname and its fields from xml file. I would think I can get reference with string name and get property value with reflection methods... can you help with this.. thank you.
Nov 17 '06 #1
0 1361

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

Similar topics

22
by: bmgz | last post by:
sorry for the stupid question, bu6 I haven't been able to find the answer anywhere.. consider this useless function which assigns an object to a var.. function(myParam){ var select1 =...
4
by: Tony Johansson | last post by:
Hello experts! I have read in a book that say once a reference attribute has been assigned a value, it cannot be changed but this is wrong I think because I can change a reference attribute see...
8
by: Lee Jackson | last post by:
Whats the difference between the following in terms of how the CLR allocates and garbage collects? Which is better in terms of memory usage/performance? a) foreach (string strURL in...
2
by: Ann Huxtable | last post by:
Hi, I have a nested object (containing dictionaries) that i want to be able to persist (and read back from) a configuration file. Anyone has any ideas/pointers as to how to go about this....
3
by: MMiGG | last post by:
Hi Our project need parse JAVA serialized object string in C, has any library? Thanx
1
fradique
by: fradique | last post by:
It was hard to figure out this, i searched in the internet but i didnt find a solution, i found a solution if you have something better or any comments plese tell me. string formName="frmTest";...
2
by: Jeremy Kitchen | last post by:
I have inherited a project and I am trying to figure out why the failing units tests that exist fail. I a, getting the following error when I attempt serialization. Any advice on what I should...
4
by: jman | last post by:
var x = eval("{ 'flag' : 1 }"); alert(x); alert(x.flag); why doesn't the above work?
2
by: surferj | last post by:
Hello, I am trying to validate the suffix of an email address for a string entered into a form to ensure it contains the correct domain. Some of the code i am currently using looks like this for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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
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...
0
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...

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.