using Directive
noun
say it: “YOO-zing dih-REK-tiv” /ˈjuːzɪŋ dɪˈrɛktɪv/
A line at the top of a C# file, such as using Football;, that lets the code write a namespace's classes by their short names.
What is using Directive in C#?
using Directive — A declaration that lets code use a namespace's types without their full names.
using System.Globalization;
namespace Orders;
class OrderDate
{
DateTime placedOn = DateTime.Today;
}
In a sentence
- “With the using directive using Football; at the top, the program can call Scoreboard.FinalScore instead of Football.Scoreboard.FinalScore.”
Level: Apprentice · More C# terms at this level
Updated