473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

.Net late binding?

I have a new position in which Studio 6 is still in use, due to the client
machines. While they're no dogs, they do have a lot running on them and are
using WinXP Pro.
Using VB6, I could minimize memory footprints by using late binding to
create a class from a dll rather than importing the entire dll (e.g. Set rs =
CreateObject("ADODB.Recordset").

Is the same possible with .Net? If I declare a variable with a fully
qualified namespace (without importing the parent namespace), am I getting
just that class or is .Net still importing the entire parent structure into
memory (e.g. Dim sr as System.IO.StreamReader without using "Imports
System.IO")?

Also, if XP is using the .Net runtime for OS cycles, am I adding anything to
memory by creating, say, a System.IO.StreamReader or a
System.Data.Odbc.OdbcConnection object?

Thanks for any thoughts or insight.
Oct 11 '06 #1
1 1220
I'm not sure what kind of reduction you are talking about. AFAIK a DLL is
loaded in its entirety even if you use a single object in it using late
binding. I'm no sure how you saw a memory footprint benefit (perhaps on
startup as it could be that all needed DLLs were loaded at startup instead
of loading them as needed).

AFAIK .NET is smart enought to defer loading until the corresponding
assembly is really needed. I wouldn't bother with what lloks like to me as
micro optimizations...

I'm not sure what you meant by the last part. Creating an object always
consume memory.

--
Patrice

"Kevin Bowker" <Ke*********@discussions.microsoft.coma écrit dans le
message de news: 79**********************************@microsoft.com...
>I have a new position in which Studio 6 is still in use, due to the client
machines. While they're no dogs, they do have a lot running on them and
are
using WinXP Pro.
Using VB6, I could minimize memory footprints by using late binding to
create a class from a dll rather than importing the entire dll (e.g. Set
rs =
CreateObject("ADODB.Recordset").

Is the same possible with .Net? If I declare a variable with a fully
qualified namespace (without importing the parent namespace), am I getting
just that class or is .Net still importing the entire parent structure
into
memory (e.g. Dim sr as System.IO.StreamReader without using "Imports
System.IO")?

Also, if XP is using the .Net runtime for OS cycles, am I adding anything
to
memory by creating, say, a System.IO.StreamReader or a
System.Data.Odbc.OdbcConnection object?

Thanks for any thoughts or insight.

Oct 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JD Kronicz | last post by:
Hi .. I have an issue I have been beating my head against the wall on for some time. I am trying to use late binding for MS graph so that my end users don't have to worry about having the right...
9
by: Zlatko Matiæ | last post by:
I was reading about late binding, but I'm not completely sure what is to be done in order to adjust code to late binding... For example, I'm not sure if this is correct: early binding: Dim ws...
5
by: eBob.com | last post by:
In another thread VJ made me aware of Tag. Fantastic! I've been wanting this capability for a long time. But it seems that I cannot use it with Option Strict On. In an event handler I have ......
30
by: lgbjr | last post by:
hi All, I've decided to use Options Strict ON in one of my apps and now I'm trying to fix a late binding issue. I have 5 integer arrays: dim IA1(500), IA2(500), IA3(500), IA4(500), IA5(500) as...
6
by: Tim Roberts | last post by:
I've been doing COM a long time, but I've just come across a behavior with late binding that surprises me. VB and VBS are not my normal milieux, so I'm hoping someone can point me to a document...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.