I have a question with the variables in C #
I am putting together a practice on a parking lot, I would need a global variable to use it in my functions.
How should they be declared?
I have a question with the variables in C #
I am putting together a practice on a parking lot, I would need a global variable to use it in my functions.
How should they be declared?
Global variables are declared by placing static within any class you are going to use, for example, declare a global variable called number.
public class clienteController : Controller
{
public static int numero; //Variable global de tipo entero
}