471,356 Members | 1,519 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Imports VS Namespace.Namespace2.Class1

Item #1:
Project Reference > DLLClass1
Project Properties > Imports > Namespace.Namespace2
- In Code Behind:
* Dim NewClass1 As New Class1

Item #2:
Project Reference > DLLClass1
- In Code Behind:
* Dim NewClass1 As New Namespace.Namespace2.Class1

* What will be better? Item #1 or #2?, Does MS have an article for this? (I
need proof for this matter, about their performance, advantages and
disadvantages.)

Thanks in Advance!
Aug 11 '05 #1
2 1079
Sorry, I couldn't find any article about this, but both alternatives should
be exactly the same at run-time. The "Imports" are resolved at compile time,
so you should not see a performance difference.
--
David Anton
www.tangiblesoftwaresolutions.com
Home of:
Clear VB: Cleans up outdated VB.NET code
Instant C#: Converts from VB.NET to C#
Instant VB: Converts from C# to VB.NET
Instant J#: Converts from VB.NET to J#
"Jon Gonzales" wrote:
Item #1:
Project Reference > DLLClass1
Project Properties > Imports > Namespace.Namespace2
- In Code Behind:
* Dim NewClass1 As New Class1

Item #2:
Project Reference > DLLClass1
- In Code Behind:
* Dim NewClass1 As New Namespace.Namespace2.Class1

* What will be better? Item #1 or #2?, Does MS have an article for this? (I
need proof for this matter, about their performance, advantages and
disadvantages.)

Thanks in Advance!

Aug 11 '05 #2
Thanks. I guess there's no performance issue at all.
The only matter is the typing issue and the DLL with the same named class.

Thanks again, till next time.

"David Anton" wrote:
Sorry, I couldn't find any article about this, but both alternatives should
be exactly the same at run-time. The "Imports" are resolved at compile time,
so you should not see a performance difference.
--
David Anton
www.tangiblesoftwaresolutions.com
Home of:
Clear VB: Cleans up outdated VB.NET code
Instant C#: Converts from VB.NET to C#
Instant VB: Converts from C# to VB.NET
Instant J#: Converts from VB.NET to J#
"Jon Gonzales" wrote:
Item #1:
Project Reference > DLLClass1
Project Properties > Imports > Namespace.Namespace2
- In Code Behind:
* Dim NewClass1 As New Class1

Item #2:
Project Reference > DLLClass1
- In Code Behind:
* Dim NewClass1 As New Namespace.Namespace2.Class1

* What will be better? Item #1 or #2?, Does MS have an article for this? (I
need proof for this matter, about their performance, advantages and
disadvantages.)

Thanks in Advance!

Aug 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Pranav Shah | last post: by
8 posts views Thread by John A Grandy | last post: by
2 posts views Thread by Jon Gonzales | last post: by
2 posts views Thread by MarioPereira | last post: by
14 posts views Thread by Jon Rea | last post: by
8 posts views Thread by v4vijayakumar | last post: by

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.