In the above example, we are importing the namespace with the help of using directive in which it imports all the classes (types) in that directory.

Note: There might be same type names in different namespaces. For example, In the .NET Framework, we have the Textbox class in both System.Windows.Controls (WPF) and System.Web.UI.WebControls (ASP.NET).

Conclusion

In this article, we have looked briefly about namespaces and using directive of C#. Hope you understand.