Click here to Skip to main content
15,868,004 members
Home / Discussions / C#
   

C#

 
GeneralRe: You gotta be kiddin me Pin
matthias s.29-Jan-03 9:11
matthias s.29-Jan-03 9:11 
GeneralRe: You gotta be kiddin me Pin
antoine@orchus-tech29-Jan-03 11:26
antoine@orchus-tech29-Jan-03 11:26 
GeneralRe: You gotta be kiddin me Pin
matthias s.29-Jan-03 18:17
matthias s.29-Jan-03 18:17 
General.NET AutoUpdate Pin
Jonathan Austin29-Jan-03 6:48
Jonathan Austin29-Jan-03 6:48 
GeneralRe: .NET AutoUpdate Pin
Paul Ingles29-Jan-03 14:55
Paul Ingles29-Jan-03 14:55 
GeneralRe: .NET AutoUpdate Pin
Jonathan Austin29-Jan-03 14:59
Jonathan Austin29-Jan-03 14:59 
GeneralIcons desktop position Pin
zedust_fr29-Jan-03 5:12
zedust_fr29-Jan-03 5:12 
GeneralCasting Types! Or Not :( Pin
FruitBatInShades29-Jan-03 2:51
FruitBatInShades29-Jan-03 2:51 
I'm working on a form editor a.k.a like in Visual Studio and sharpdevelop. I save the forms out as xml mainly using to the .ToString methods and then try to convert them back on load.
I thought this would be the way to do it:-
Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name)<br />
  If Not PInfo Is Nothing Then<br />
    Dim t As Type = PInfo.GetType()<br />
    PInfo.SetValue(ctrl, (CType(Nde.Value, PInfo.GetType())), Nothing)<br />
  End If

but CType and DirectCast do not accept PInfo.GetType(). They demand a hand coded type e.g. CType(Value, Integer). Does anybody know of a way to do this?

I look for the TagName via reflection :- Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name) and it returns fine, so it's found the property. But how do I then convert the value to the correct Type so I can set the property value?

Demo XML:
<code><VISIBLE>True</VISIBLE>
<Text>Caption :</Text>
<TextAlign>1</TextAlign></code> 

GeneralRe: Casting Types! Or Not :( Pin
Philip Fitzsimons29-Jan-03 3:35
Philip Fitzsimons29-Jan-03 3:35 
GeneralRe: Casting Types! Or Not :( Pin
FruitBatInShades29-Jan-03 3:40
FruitBatInShades29-Jan-03 3:40 
GeneralRe: Casting Types! Or Not :( Pin
Philip Fitzsimons29-Jan-03 3:43
Philip Fitzsimons29-Jan-03 3:43 
GeneralRe: Casting Types! Or Not :( Pin
Richard Deeming29-Jan-03 4:46
mveRichard Deeming29-Jan-03 4:46 
QuestionHow to convert a C# project into an UML diagram Pin
Frankie Leung28-Jan-03 20:42
Frankie Leung28-Jan-03 20:42 
AnswerRe: How to convert a C# project into an UML diagram Pin
Philip Fitzsimons29-Jan-03 3:36
Philip Fitzsimons29-Jan-03 3:36 
GeneralRe: How to convert a C# project into an UML diagram Pin
Frankie Leung29-Jan-03 17:09
Frankie Leung29-Jan-03 17:09 
GeneralMedian Filter Pin
keem28-Jan-03 19:18
keem28-Jan-03 19:18 
GeneralRe: Median Filter Pin
Christian Graus28-Jan-03 23:59
protectorChristian Graus28-Jan-03 23:59 
GeneralRe: Median Filter Pin
keem29-Jan-03 13:45
keem29-Jan-03 13:45 
GeneralRe: Median Filter Pin
Christian Graus29-Jan-03 15:28
protectorChristian Graus29-Jan-03 15:28 
QuestionHow to display text in a label vertically Pin
chito28-Jan-03 18:54
chito28-Jan-03 18:54 
AnswerRe: How to display text in a label vertically Pin
Chris Austin28-Jan-03 19:32
Chris Austin28-Jan-03 19:32 
AnswerRe: How to display text in a label vertically Pin
Meysam Mahfouzi29-Jan-03 18:03
Meysam Mahfouzi29-Jan-03 18:03 
GeneralPreventing messages with AddMessageFilter() Pin
Meysam Mahfouzi28-Jan-03 16:32
Meysam Mahfouzi28-Jan-03 16:32 
GeneralRe: Preventing messages with AddMessageFilter() Pin
Chris Austin28-Jan-03 17:47
Chris Austin28-Jan-03 17:47 
GeneralTAPI CallerID Pin
OBRon28-Jan-03 15:49
OBRon28-Jan-03 15:49 

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.