Classes are not called, only methods are called. At most it is calling the constructor that instantiates the class and the object is stored in the variable, usually in an indirect way.
If you are talking about where to declare the variables that will support the instance, there is no certain place pre-defined , is used where it has to use. It may be in the class, it may be within a method, if your lifetime should be local.
If you go at the beginning of the class, in the middle, at the end, before or after something, if everything goes scattered, little or nothing matters. It's a matter of organization and taste. It's very common to get it done early on, but not everyone follows it, and there may be cases where it's best to do it differently.
There is no technical requirement, the order can not be defined within the class, only within methods.
It is common to group all private members, then group the properties. It is also usual to group the static members. Some people like to use #region
, but most prefer to avoid it.
If you need too much organization it is likely that the class is doing too many things.
In this case several variables of class Manutenção_cliente
are being initialized when an instance of this class is created. It seems to be a wise decision for this case.
In some cases it may be that some members need to be initialized within the builder , common when you need a specific order or need to initialize other parts of the instances that can not be easily made into the variables (needs limb initialization), or some specific processing. In much rarer cases you may need to boot into some "normal" method, but this is a danger because the class will possibly be in an invalid state.
This code does not follow the C # naming pattern . It also uses public or at least internal memberships (default visibility), which should normally be avoided, but not at all costs , you need to know when to do it or not.