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