Imports VS Namespace.Namespace2.Class1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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#
 
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.
 
Back
Top