new Operator
noun
say it: “NOO OP-er-ay-ter” /nuː ˈɒpəreɪtər/
The C# keyword that creates a new object or array.
What does new Operator do in C#?
new Operator — An operator that creates an object or array and returns its reference.
class Book
{
string title;
Book(string title)
{
this.title = title;
}
}
In a sentence
- “I used the new operator to create a Team: new Team("Hawks").”
Level: Journeyman · More C# terms at this level
Updated