Multiple choice technology web technology

What is the use of 'using command' in C#?

  1. To specify the class where namespace is located

  2. Inorder to include objects into a .cs file

  3. Create an alias for a namespace

  4. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The 'using' directive in C# creates an alias for a namespace or imports types from a namespace. It appears at the top of a .cs file to simplify code by allowing use of short type names instead of fully qualified names. The using statement for resource disposal is a different construct with similar syntax.