are theses considered namespaces?
are theses considered namespaces
using System;
using MyApplication.Utilities;
11 Replies
If you put them in a
using X
, as opposed to a using static Y
, or a using Z = A
, then yes, they're namespacesI’m confused
D:
What is confusing you?
yes, but like fred is saying you can have lines that start with
using
that aren't namespaces tooOh okay
What would be an example
Of this
the things fred mentioned
static usings and type aliases respectively
static usings: bring all the static members of a type into the file's scope (so you use them as if they were global variables/functions)
type aliases: call a type something else to avoid conflicts with other types that have the same name
they aren't very commonly used
Give me one second gotta look up what a type/type reference/type aliases is
Do you guys reccomend chat gpt
no
you have to know generally what you're doing in order to use chatgpt otherwise you won't know if it's telling you garbage
Dam
Would string be a type
Yes
Any class or struct is a type
Okay : )