HighTechTalks DotNet Forums  

Imports VS Namespace.Namespace2.Class1

Dotnet General Discussions microsoft.public.dotnet.general


Discuss Imports VS Namespace.Namespace2.Class1 in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jon Gonzales
 
Posts: n/a

Default Imports VS Namespace.Namespace2.Class1 - 08-10-2005 , 09:32 PM






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!

Reply With Quote
  #2  
Old   
David Anton
 
Posts: n/a

Default RE: Imports VS Namespace.Namespace2.Class1 - 08-11-2005 , 08:29 AM






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:

Quote:
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!

Reply With Quote
  #3  
Old   
Jon Gonzales
 
Posts: n/a

Default RE: Imports VS Namespace.Namespace2.Class1 - 08-11-2005 , 06:18 PM



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:

Quote:
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!

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.