473,388 Members | 868 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,388 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 1141
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Pranav Shah | last post by:
What is the differrence between using the "using" caluse outside of the namespace definition and inside the namespace. Example Outside: using System; namespace Example.Outside { }
6
by: Brent | last post by:
I'm really new to threading. Imagine you create a thread like this: public MainForm() { InitializeComponent(); Thread trd = new Thread(new ThreadStart(this.threadControl));
8
by: John A Grandy | last post by:
what are the various alternatives to including a group of imports statements in every module ? imports <namespace1.class1> imports <namespace2.class1> imports <namespace2.class2> etc.
2
by: Jon Gonzales | last post by:
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...
2
by: MarioPereira | last post by:
I have created a website using .NET Framework 2.0 with some web services that share the same object model (defined in the App_Code). When adding web references to these web services from a web...
4
by: carqs123 | last post by:
What is the procedure for using a class defined in the same solution but in another project? The language I am using is c-sharp. I have a solution with two projects in it. A c-sharp program in...
14
by: Jon Rea | last post by:
I am currently cleaning up an application which was origainlly hashed together with speed of coding in mind and therefore contains quite a few "hacky" shortcuts. As part of this "revamping"...
9
by: Mark Olbert | last post by:
I'm trying to serialize (using XmlSerializer.Serialize) a class that I generated from an XSD schema using XSD.EXE /c. The problem I'm running into is that the root element needs to be unqualified,...
8
by: v4vijayakumar | last post by:
Why following statement is not a "forward declaration"? :( class namespace1::namespace2::class1;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.