473,396 Members | 2,052 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,396 software developers and data experts.

Which namespaces are automatically "used" by .net platform?

As you might know that "java.lang" package are automatically imported by the
java compiler so that one don't need to write the import statement of that
package in the source code. Are there any packages in .net are automatically
"used" when your are writing a .net application? I am told that Visual Studio
..net automatically include different packages depending on the kind of
applications you are creating. is this true? Will the compilier include any
"default" packages, e.g. "System"?
Jul 21 '05 #1
4 1447
Sparks,
I am told that Visual Studio
.net automatically include different packages depending on the kind of
applications you are creating. is this true? Will the compilier include
any
"default" packages, e.g. "System"?


This is simple to answer

Yes

I hope this helps,

Cor
Jul 21 '05 #2
Thanks for your reply Cor, but I still have no idear if any packages are
automatically included. Do you mean VS Studio .net automatically include some
packages depending on the type of application you are creating? Or the
compilier will include some "default" packages? Or did you mean both?

Could you also pls kindly list what packages are automatically included in
by VS Studio.net or/and the compilier?

Thanks very much!

"Cor Ligthert" wrote:
Sparks,
I am told that Visual Studio
.net automatically include different packages depending on the kind of
applications you are creating. is this true? Will the compilier include
any
"default" packages, e.g. "System"?


This is simple to answer

Yes

I hope this helps,

Cor

Jul 21 '05 #3
sparks <sp****@discussions.microsoft.com> wrote:
As you might know that "java.lang" package are automatically imported by the
java compiler so that one don't need to write the import statement of that
package in the source code. Are there any packages in .net are automatically
"used" when your are writing a .net application? I am told that Visual Studio
.net automatically include different packages depending on the kind of
applications you are creating. is this true? Will the compilier include any
"default" packages, e.g. "System"?


When VS.NET creates a project, it adds various references
automatically, depending on the type of project. You can find that out
by expanding the list of references.

However, C# doesn't include any namespaces by default other than the
namespace of the class you're writing and all "parent" namespaces. (So
if you're writing a class in Foo.Bar, then Foo.Bar, Foo and the unnamed
namespace are all automatically included.)

This is language-specific though - other languages may include
namespaces automatically.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
Sparks,

When you open by instance a VBNet winforms project than it set automaticly
the resources that it normally needs for that. As well set it the most used
imports (namespaces) in a kind of property file (with C# it sets that in top
of the program files).

When you open an VBNet webapplication, than it will set automaticly other
resources and an other import (However the Microsoft.VisualBasic namespace
is forever included in VBNet while it is never in C#, although you can use
that in the same way as every other namespace in C#)

Than everything is included to make a kind of standard winforms or webforms
application. Do you need more librarys, than you can add those using the
Project->resources. You can than choose to declare the full namespace in
your code or to set an Using (with C) or a Import with VBNet (Acts completly
the same however it needs in C# a ";" at the end).

You can manage a lot of behaviour using the properties from VSNet.

I hope this helps,

Cor
Jul 21 '05 #5

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

Similar topics

4
by: Mark Erikson | last post by:
I'm currently writing an HTML editor for the PocketPC, and one of my Tag class's properties is DefaultAttributes. The idea behind this is that some tags are almost always used with certain...
9
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
4
by: J. Campbell | last post by:
From reading this forum, it is my understanding that C++ doesn't require the compiler to keep code that does not manifest itself in any way to the user. For example, in the following: { for(int...
40
by: Dave Hansen | last post by:
Please note crosspost. Often when writing code requiring function pointers, it is necessary to write functions that ignore their formal parameters. For example, a state machine function might...
4
by: sparks | last post by:
As you might know that "java.lang" package are automatically imported by the java compiler so that one don't need to write the import statement of that package in the source code. Are there any...
4
by: escristian | last post by:
Hello. I'm trying to create an Image so I use something like this: Image newImage = Image.FromFile(filename); Now when it's a bmp file and certain .gif files it gives me an exception that...
94
by: Samuel R. Neff | last post by:
When is it appropriate to use "volatile" keyword? The docs simply state: " The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock...
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
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?
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.