Click here to Skip to main content
15,911,487 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# eBooks Pin
HimaBindu Vejella15-Mar-06 22:16
HimaBindu Vejella15-Mar-06 22:16 
Answer[Message Removed] Pin
hankjmatt13-Oct-08 21:23
hankjmatt13-Oct-08 21:23 
QuestionC# login application Pin
julien27ph24-Jan-06 19:28
julien27ph24-Jan-06 19:28 
AnswerRe: C# login application Pin
AB777124-Jan-06 19:45
AB777124-Jan-06 19:45 
GeneralRe: C# login application Pin
julien27ph26-Jan-06 13:53
julien27ph26-Jan-06 13:53 
QuestionHow to find a created object dynamically Pin
andylke24-Jan-06 18:41
andylke24-Jan-06 18:41 
AnswerRe: How to find a created object dynamically Pin
AB777124-Jan-06 18:54
AB777124-Jan-06 18:54 
GeneralRe: How to find a created object dynamically Pin
andylke24-Jan-06 19:25
andylke24-Jan-06 19:25 
I have something like the below code which might be reasonable to be in this way when there is just a 1,2 class and 1,2 property. But now i am having like 10++ different classed with each class having dozens of properties that i need to get and return the value which the name i can only know when its running coz its classname/propname is from a database table.
*********************************************
Select Case ClassName
Case "Class1"
Select Case PropName
Case "Prop1"
Return clsObj1.Prop1
Case "Prop2"
Return clsObj1.Prop1
End Select
Case "Class2"
Select Case Key
Case "Prop1"
Return clsObj2.Prop1
Case "Prop2"
Return clsObj2.Prop1
End Select
End Select
*********************************************

I was thinking to do something like

*********************************************
Select Case ClassName
Case "Class1"
return myType.InvokeMembers(PropName, Binding.GetProperty, clsObj1, nothing)
Case "Class2"
return myType.InvokeMembers(PropName, Binding.GetProperty, clsObj2, nothing)
End Select
*********************************************
This actually works but only problem is i still need to do this numerous time for each object. Is there somewhat a way to get back the reference of created object by name/type of the object so i do not need to code like this.
Thanks for ur reply.


MiaoMiao
GeneralRe: How to find a created object dynamically Pin
AB777124-Jan-06 19:42
AB777124-Jan-06 19:42 
GeneralRe: How to find a created object dynamically Pin
andylke24-Jan-06 19:54
andylke24-Jan-06 19:54 
GeneralRe: How to find a created object dynamically Pin
AB777124-Jan-06 21:32
AB777124-Jan-06 21:32 
GeneralRe: How to find a created object dynamically Pin
andylke24-Jan-06 21:36
andylke24-Jan-06 21:36 
QuestionUsing checkbox and button in DataList Pin
JayaDurai24-Jan-06 18:25
JayaDurai24-Jan-06 18:25 
QuestionAlter Table query in DBF through C#.NET ,Problem Pin
Anil Dhiman24-Jan-06 17:34
Anil Dhiman24-Jan-06 17:34 
QuestionSearch Engine Pin
Tugbay Sahin24-Jan-06 15:40
Tugbay Sahin24-Jan-06 15:40 
AnswerRe: Search Engine Pin
Heath Stewart24-Jan-06 15:51
protectorHeath Stewart24-Jan-06 15:51 
AnswerRe: Search Engine Pin
tarasn24-Jan-06 20:44
tarasn24-Jan-06 20:44 
QuestionNetwork drives Pin
Libor Tinka24-Jan-06 12:01
Libor Tinka24-Jan-06 12:01 
AnswerRe: Network drives Pin
Heath Stewart24-Jan-06 16:19
protectorHeath Stewart24-Jan-06 16:19 
QuestionSetWindowsHookEx fails on WIN98 Pin
ranzask24-Jan-06 10:31
ranzask24-Jan-06 10:31 
AnswerRe: SetWindowsHookEx fails on VS Express and work on VS2003 Pin
Heath Stewart24-Jan-06 11:41
protectorHeath Stewart24-Jan-06 11:41 
GeneralRe: SetWindowsHookEx fails on VS Express and work on VS2003 Pin
ranzask24-Jan-06 11:48
ranzask24-Jan-06 11:48 
GeneralRe: SetWindowsHookEx fails on VS Express and work on VS2003 Pin
Heath Stewart24-Jan-06 11:52
protectorHeath Stewart24-Jan-06 11:52 
GeneralRe: SetWindowsHookEx fails on VS Express and work on VS2003 Pin
ranzask24-Jan-06 12:11
ranzask24-Jan-06 12:11 
GeneralRe: SetWindowsHookEx fails on VS Express and work on VS2003 Pin
Heath Stewart24-Jan-06 12:15
protectorHeath Stewart24-Jan-06 12:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.