In C# using namespace System declaration can be omitted?
.net, c#
Solution
`using System;` isn't required in this case because the code is already located in the `System` namespace (see the `namespace System.Web.Mvc.Html` line).
To answer your question, no there is no way to include a namespace without declaration in C# other than already being in that namespace.
Problem
Here is an example code I got from aspnetwebstack http://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Mvc/Html/MvcForm.cs ``` using System.Diagnostics.CodeAnalysis; using System.Web.Mvc.Properties; namespace System.Web.Mvc.Html { public class MvcForm : IDisposable { private readonly ViewContext _viewContext; private bool _disposed; [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "httpResponse", Justification = "This method existed in MVC 1.0 and has been deprecated.")] [Obsolete("This constructor is obsolete, because its functionality has been moved to MvcForm(ViewContext) now.", true /* error */)] public MvcForm(HttpResponseBase httpResponse) { throw new InvalidOperationException(MvcResources.MvcForm_ConstructorObsolete); } public MvcForm(ViewContext viewContext) { if (viewContext == null) { throw new ArgumentNullException("viewContext"); } _viewContext = viewContext; // push the new FormContext _viewContext.FormContext = new FormContext(); } ``` IDisposable is defined in namespace System. In order to use it, has to declare the namespace System like this, ``` Using System ``` But in this example, it doesn't declare that. My question is Is there a place to include a namespace by default without declaration in C# ?