Click here to Skip to main content
15,912,205 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to mouse gesture without window? Pin
jchigg200020-Nov-08 2:18
jchigg200020-Nov-08 2:18 
GeneralRe: how to mouse gesture without window? Pin
Giorgi Dalakishvili20-Nov-08 2:20
mentorGiorgi Dalakishvili20-Nov-08 2:20 
GeneralRe: how to mouse gesture without window? Pin
jchigg200020-Nov-08 2:24
jchigg200020-Nov-08 2:24 
GeneralRe: how to mouse gesture without window? Pin
Darryl Borden20-Nov-08 8:44
Darryl Borden20-Nov-08 8:44 
GeneralRe: how to mouse gesture without window? Pin
ping_jacob22-Nov-08 2:35
ping_jacob22-Nov-08 2:35 
GeneralRe: how to mouse gesture without window? Pin
Giorgi Dalakishvili22-Nov-08 3:18
mentorGiorgi Dalakishvili22-Nov-08 3:18 
GeneralRe: how to mouse gesture without window? Pin
ping_jacob14-Dec-08 6:22
ping_jacob14-Dec-08 6:22 
GeneralRe: how to mouse gesture without window? Pin
Giorgi Dalakishvili14-Dec-08 7:03
mentorGiorgi Dalakishvili14-Dec-08 7:03 
Questionhow to access a property / member variable at run time Pin
here2learn20-Nov-08 1:02
here2learn20-Nov-08 1:02 
AnswerRe: how to access a property / member variable at run time PinPopular
Giorgi Dalakishvili20-Nov-08 1:10
mentorGiorgi Dalakishvili20-Nov-08 1:10 
GeneralRe: how to access a property / member variable at run time Pin
here2learn20-Nov-08 1:50
here2learn20-Nov-08 1:50 
GeneralRe: how to access a property / member variable at run time Pin
Giorgi Dalakishvili20-Nov-08 1:58
mentorGiorgi Dalakishvili20-Nov-08 1:58 
GeneralRe: how to access a property / member variable at run time Pin
here2learn20-Nov-08 2:20
here2learn20-Nov-08 2:20 
GeneralRe: how to access a property / member variable at run time Pin
Giorgi Dalakishvili20-Nov-08 2:21
mentorGiorgi Dalakishvili20-Nov-08 2:21 
AnswerRe: how to access a property / member variable at run time Pin
Ashfield20-Nov-08 1:16
Ashfield20-Nov-08 1:16 
GeneralRe: how to access a property / member variable at run time Pin
here2learn20-Nov-08 1:52
here2learn20-Nov-08 1:52 
AnswerRe: how to access a property / member variable at run time Pin
Simon P Stevens20-Nov-08 1:25
Simon P Stevens20-Nov-08 1:25 
Like Giorgi has suggested, reflection is the way to do this.

I would be slightly careful with this though. Your basically allowing the data stored in the database to define what methods get called. What if someone nasty changed the database values to call a method that did something bad.

If you only have 4 different properties that you want to call dynamically, I would consider doing it with a switch statement. Just switch on the database value, and call the appropriate property. This way you are validating that the database value is something you expect.

I know your example was simplified, and your probably doing something more complex, so maybe a simple switch isn't appropriate. Just be aware that allowing methods to be dynamically called based on database values (Which could essentially be user input) you open up the risk of some kind of method name injection attack.

Simon

GeneralRe: how to access a property / member variable at run time Pin
here2learn20-Nov-08 1:56
here2learn20-Nov-08 1:56 
QuestionDetecting the Mouse Wheel on a ListView Control Pin
Darryl Borden19-Nov-08 23:34
Darryl Borden19-Nov-08 23:34 
AnswerRe: Detecting the Mouse Wheel on a ListView Control Pin
DaveyM6919-Nov-08 23:48
professionalDaveyM6919-Nov-08 23:48 
AnswerRe: Detecting the Mouse Wheel on a ListView Control Pin
Seraph_summer20-Nov-08 3:42
Seraph_summer20-Nov-08 3:42 
AnswerRe: Detecting the Mouse Wheel on a ListView Control Pin
DaveyM6920-Nov-08 4:32
professionalDaveyM6920-Nov-08 4:32 
QuestionProcessor ID Pin
Syed Shahid Hussain19-Nov-08 22:21
Syed Shahid Hussain19-Nov-08 22:21 
AnswerRe: Processor ID Pin
Samer Aburabie19-Nov-08 22:31
Samer Aburabie19-Nov-08 22:31 
AnswerRe: Processor ID Pin
#realJSOP19-Nov-08 23:40
professional#realJSOP19-Nov-08 23: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.