Click here to Skip to main content
16,005,206 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: font in message box Pin
MatrixCoder6-Jan-07 6:23
MatrixCoder6-Jan-07 6:23 
AnswerRe: font in message box Pin
Thomas Stockwell6-Jan-07 8:19
professionalThomas Stockwell6-Jan-07 8:19 
AnswerRe: font in message box Pin
Paul Conrad6-Jan-07 13:11
professionalPaul Conrad6-Jan-07 13:11 
GeneralRe: font in message box Pin
charchabil0326-Jan-07 7:23
charchabil0326-Jan-07 7:23 
QuestionFrom String to Type Pin
Curse4Life6-Jan-07 1:53
Curse4Life6-Jan-07 1:53 
AnswerRe: From String to Type Pin
Colin Angus Mackay6-Jan-07 3:09
Colin Angus Mackay6-Jan-07 3:09 
GeneralRe: From String to Type Pin
Curse4Life6-Jan-07 7:43
Curse4Life6-Jan-07 7:43 
GeneralRe: From String to Type Pin
Colin Angus Mackay6-Jan-07 7:52
Colin Angus Mackay6-Jan-07 7:52 
Curse4Life wrote:
TempObject.GetType().GetProperty(MyProperty.Name).SetValue(TempObject, MyProperty.Value, Nothing)


When you do this big long line of code you lose several useful things.
1. You lose the ability to debug easily in to part of the code. You end up stepping in and out of lots of things before you get to the bit you want.
2. You lose some readability because it becomes difficult to see what each part is actually doing and in what order.
3. You lose sight of what is going in and coming out of each part. Which means you cannot see the forest for the trees.

This bit:
TempObject.GetType().GetProperty(MyProperty.Name)
should return a PropertyInfo. It will tell you what this bit:
MyProperty.Value
needs to be changed to in order for it to work.

You must make the string into the type that the property expects.




Upcoming Scottish Developers events:
* Glasgow: Tell us what you want to see in 2007


My: Website | Blog | Photos

GeneralRe: From String to Type Pin
Curse4Life6-Jan-07 9:11
Curse4Life6-Jan-07 9:11 
GeneralRe: From String to Type Pin
Colin Angus Mackay6-Jan-07 13:59
Colin Angus Mackay6-Jan-07 13:59 
QuestionAxMsFlexGrid Pin
K edar V6-Jan-07 1:26
K edar V6-Jan-07 1:26 
QuestionCall win32 function from vb.net Pin
shabyb6-Jan-07 0:42
shabyb6-Jan-07 0:42 
AnswerRe: Call win32 function from vb.net Pin
Duncan Edwards Jones6-Jan-07 1:40
professionalDuncan Edwards Jones6-Jan-07 1:40 
AnswerRe: Call win32 function from vb.net Pin
shabyb6-Jan-07 4:41
shabyb6-Jan-07 4:41 
GeneralRe: Call win32 function from vb.net Pin
Duncan Edwards Jones6-Jan-07 9:08
professionalDuncan Edwards Jones6-Jan-07 9:08 
AnswerRe: Call win32 function from vb.net Pin
shabyb6-Jan-07 10:56
shabyb6-Jan-07 10:56 
GeneralRe: Call win32 function from vb.net Pin
Duncan Edwards Jones6-Jan-07 11:30
professionalDuncan Edwards Jones6-Jan-07 11:30 
AnswerRe: Call win32 function from vb.net Pin
Thomas Stockwell6-Jan-07 8:21
professionalThomas Stockwell6-Jan-07 8:21 
GeneralRe: Call win32 function from vb.net Pin
shabyb6-Jan-07 11:01
shabyb6-Jan-07 11:01 
GeneralRe: Call win32 function from vb.net Pin
Thomas Stockwell6-Jan-07 13:51
professionalThomas Stockwell6-Jan-07 13:51 
GeneralRe: Call win32 function from vb.net Pin
shabyb7-Jan-07 5:34
shabyb7-Jan-07 5:34 
GeneralRe: Call win32 function from vb.net Pin
Thomas Stockwell7-Jan-07 8:57
professionalThomas Stockwell7-Jan-07 8:57 
GeneralRe: Call win32 function from vb.net Pin
Thomas Stockwell7-Jan-07 12:04
professionalThomas Stockwell7-Jan-07 12:04 
GeneralRe: Call win32 function from vb.net Pin
shabyb8-Jan-07 8:27
shabyb8-Jan-07 8:27 
AnswerRe: Call win32 function from vb.net Pin
Christian Graus6-Jan-07 11:00
protectorChristian Graus6-Jan-07 11:00 

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.