✅ static, public, void
I'm new to C# and I was wondering if I were correct that static means you can use an object or method outside of the file you are coding in, public means you are able to use an object or a method outside of a specific class and void means you will not return anything in the method proceeded?
8 Replies
static
means it's accessible without an instance
You're mostly correct on public
, since in case of classes it means the class is usable in other projects
And you're spot-on on void
tysm
an instance is when you call a variable from a class or something right?
definitly the most useful piece of information tysm bro
how do u write in that embedded thingy on discord?
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/alr
ty
:Ok: