Click here to Skip to main content
15,894,825 members
Home / Discussions / C#
   

C#

 
QuestionInputLanguage Pin
SVb.net14-Nov-07 22:36
SVb.net14-Nov-07 22:36 
QuestionHow to: Override function with other function, that already exists? [modified] (Unanswered!) Pin
alex_inside14-Nov-07 22:14
alex_inside14-Nov-07 22:14 
QuestionRe: Set function to other function. C# (I mean I want that:) Pin
alex_inside15-Nov-07 0:29
alex_inside15-Nov-07 0:29 
QuestionChoosing and setting a control's property programatically Pin
Dewald14-Nov-07 21:59
Dewald14-Nov-07 21:59 
AnswerRe: Choosing and setting a control's property programatically Pin
Martin#14-Nov-07 22:07
Martin#14-Nov-07 22:07 
GeneralRe: Choosing and setting a control's property programatically Pin
Dewald15-Nov-07 0:00
Dewald15-Nov-07 0:00 
GeneralRe: Choosing and setting a control's property programatically Pin
Martin#15-Nov-07 0:04
Martin#15-Nov-07 0:04 
GeneralRe: Choosing and setting a control's property programatically Pin
Dewald15-Nov-07 1:28
Dewald15-Nov-07 1:28 
Martin#, I'm going to push my luck and ask a related question. I'm sure that the answer also lies in reflection somewhere but seeing as it's all new to me and will involve some study I thought I'd see if you could help me.

Would there be a way perhaps of instantiating a new object based on a type that is also obtained during runtime? In other words, I read a file which contains XML (or whatever text based representation of objects) which I then would like to put onto a form.

Let's assume the file holds something like:
Type=Button
Name=MyNewButton
Text=My New Button

Now I can read these into variables, let's call them newType, newName and newText.

How do I instantiate a new object? Again Button newButton = new Button() is easy enough but at runtime it could be Label, TextBox or anything else.

After this is over I promise to make an effort of getting on top of reflection.;)

Thanks,
D
GeneralRe: Choosing and setting a control's property programatically Pin
Martin#15-Nov-07 1:49
Martin#15-Nov-07 1:49 
GeneralRe: Choosing and setting a control's property programatically Pin
Dewald15-Nov-07 2:53
Dewald15-Nov-07 2:53 
GeneralRe: Choosing and setting a control's property programatically Pin
Martin#15-Nov-07 3:09
Martin#15-Nov-07 3:09 
GeneralRe: Choosing and setting a control's property programatically Pin
Dewald15-Nov-07 4:51
Dewald15-Nov-07 4:51 
GeneralRe: Choosing and setting a control's property programatically Pin
Martin#15-Nov-07 20:35
Martin#15-Nov-07 20:35 
GeneralRe: Choosing and setting a control's property programatically Pin
Dewald15-Nov-07 21:09
Dewald15-Nov-07 21:09 
GeneralRe: Choosing and setting a control's property programatically Pin
Martin#15-Nov-07 21:11
Martin#15-Nov-07 21:11 
QuestionExecution Problem Pin
DeepOceans14-Nov-07 21:59
DeepOceans14-Nov-07 21:59 
AnswerRe: Execution Problem Pin
Adeel Chaudhry14-Nov-07 22:10
Adeel Chaudhry14-Nov-07 22:10 
GeneralRe: Execution Problem Pin
DeepOceans14-Nov-07 23:29
DeepOceans14-Nov-07 23:29 
GeneralRe: Execution Problem Pin
Adeel Chaudhry14-Nov-07 23:35
Adeel Chaudhry14-Nov-07 23:35 
GeneralRe: Execution Problem Pin
Luc Pattyn15-Nov-07 1:49
sitebuilderLuc Pattyn15-Nov-07 1:49 
GeneralRe: Execution Problem Pin
DeepOceans15-Nov-07 20:44
DeepOceans15-Nov-07 20:44 
GeneralRe: Execution Problem Pin
Luc Pattyn16-Nov-07 2:37
sitebuilderLuc Pattyn16-Nov-07 2:37 
GeneralRe: Execution Problem Pin
DeepOceans19-Nov-07 1:01
DeepOceans19-Nov-07 1:01 
GeneralRe: Execution Problem Pin
Luc Pattyn19-Nov-07 1:21
sitebuilderLuc Pattyn19-Nov-07 1:21 
QuestionChristian Graus can you help me with this? Pin
MumbleB14-Nov-07 21:40
MumbleB14-Nov-07 21:40 

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.