Note the following code:
class Program
{
int marks;
static int maxmarx = 50;
void CalcularPorcentagem()
{
int porcento = (this.marks * 100) / Program.maxmarx;
Console.WriteLine(porcento);
}
After testing in the following two ways, I noticed that the program returns the same value when the class is instantiated. So I would like to know the difference between using:
int porcento = (this.marks * 100) / Program.maxmarx;
or
int porcento = (this.marks * 100) / maxmarx;