Doubt variables in C #

-3

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?

    
asked by Fernando Withmore 16.12.2018 в 22:52
source

1 answer

-2

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
}
    
answered by 16.12.2018 / 23:31
source