Click here to Skip to main content
16,014,869 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: insert listbox items into database Pin
jds120729-May-07 8:30
jds120729-May-07 8:30 
GeneralRe: insert listbox items into database Pin
Dave Sexton29-May-07 22:04
Dave Sexton29-May-07 22:04 
Questionhow to show video properties Pin
somchoto29-May-07 7:43
somchoto29-May-07 7:43 
Questionsearch for files Pin
jds120729-May-07 4:20
jds120729-May-07 4:20 
QuestionCallByName Pin
advansis29-May-07 4:11
advansis29-May-07 4:11 
AnswerRe: CallByName Pin
Dave Kreskowiak29-May-07 6:56
mveDave Kreskowiak29-May-07 6:56 
AnswerRe: CallByName Pin
Ian Shlasko29-May-07 11:06
Ian Shlasko29-May-07 11:06 
GeneralRe: CallByName Pin
Dave Kreskowiak29-May-07 13:23
mveDave Kreskowiak29-May-07 13:23 
Ian Shlasko wrote:
It looks like he's trying to bring back late-binding. As a disclaimer, I suggest avoiding this technique when possible, as it's slow, inefficient, and prone to runtime errors.


Yeah, I was thinking the same thing, though I didn't want to jump to conclusions.


Ian Shlasko wrote:
Get the type of your object (obj.GetType() or TypeOf obj), then call GetProperty() on that (Check MSDN for the syntax and parameters). That'll get you a PropertyInfo object, which you can use to access the property.

Remember that this is a LOT slower than just calling object.property, so if you need to call it a few thousand times quickly, you might need to redesign.


Along the lines of 30-50 times as long as doing it the "old fashioned" way - direct assignment.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


QuestionWhat is the conversion between postscript points to em? Pin
Marcus J. Smith29-May-07 2:00
professionalMarcus J. Smith29-May-07 2:00 
AnswerRe: What is the conversion between postscript points to em? Pin
advansis29-May-07 4:18
advansis29-May-07 4:18 
QuestionThis field cannot be summarized Pin
Rm_alamami29-May-07 1:24
Rm_alamami29-May-07 1:24 
AnswerRe: This field cannot be summarized Pin
Rupesh Kumar Swami29-May-07 1:45
Rupesh Kumar Swami29-May-07 1:45 
QuestionHow to Set Media Format when Ripping CD in Windows media player 11 SDK Pin
Juvil John29-May-07 1:19
Juvil John29-May-07 1:19 
Questionsingle quotes in vb.net Pin
Sonia Gupta29-May-07 1:11
Sonia Gupta29-May-07 1:11 
AnswerRe: single quotes in vb.net Pin
Ali 11029-May-07 1:19
Ali 11029-May-07 1:19 
GeneralRe: single quotes in vb.net Pin
Sonia Gupta29-May-07 2:01
Sonia Gupta29-May-07 2:01 
GeneralRe: single quotes in vb.net Pin
Colin Angus Mackay29-May-07 3:11
Colin Angus Mackay29-May-07 3:11 
GeneralRe: single quotes in vb.net Pin
Colin Angus Mackay29-May-07 3:12
Colin Angus Mackay29-May-07 3:12 
AnswerRe: single quotes in vb.net Pin
Rupesh Kumar Swami29-May-07 1:22
Rupesh Kumar Swami29-May-07 1:22 
GeneralRe: single quotes in vb.net Pin
Sonia Gupta29-May-07 2:01
Sonia Gupta29-May-07 2:01 
GeneralRe: single quotes in vb.net Pin
Colin Angus Mackay29-May-07 3:14
Colin Angus Mackay29-May-07 3:14 
GeneralRe: single quotes in vb.net Pin
leckey29-May-07 4:02
leckey29-May-07 4:02 
GeneralRe: single quotes in vb.net Pin
Dave Kreskowiak29-May-07 4:22
mveDave Kreskowiak29-May-07 4:22 
GeneralRe: single quotes in vb.net Pin
Colin Angus Mackay29-May-07 6:34
Colin Angus Mackay29-May-07 6:34 
GeneralRe: single quotes in vb.net Pin
Dave Kreskowiak29-May-07 6:52
mveDave Kreskowiak29-May-07 6:52 

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.