|
-
Jan 4th, 2006, 10:05 AM
#1
Interview Panel Question
I was on a panel for taking interviews for a candidate along with one other person. Most of my questions were related to databases and client-server architecture.
Now my colleague popped a question to which I frankly didn't know the answer. He asked whats the difference between a variant and an object.
I personally think there is none, but I was wondering if I had missed something while coding.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jan 4th, 2006, 10:18 AM
#2
Re: Interview Panel Question
An object is a specific data type which is essentially a pointer, and can reference items such as controls/forms/applications. A variable declared "As Object" can contain any object, not just one specific kind ("As Control" would restrict you to just controls).
A variant is an "undefined" data type, and can contain basically any variable, Object or not. There is a memory and speed overhead involved, as information about the actual data type needs to be stored & read/written whenever the variable is used.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|