6
Guys, I’m new and I have some "basic questions".
I’m making a score, because there are many players I want to create the function to decrease/ increment.
Incremental function
public void incremento(int pt, int mago)
{
pt++;
switch (mago) {
case 1:
labelM1.Text = String.Format("{0} Pontos", pt);
break;
}
}
Event button +(increment)
private void M1mais_Click(object sender, EventArgs e)
{
incremento(pt1, mago1);
}
But the label where the current total of points should appear only increases the first time.
What’s wrong? That’s the best way?
As the value is read within the method, it should be
ref
instead ofout
.– Miguel Angelo
@Miguelangelo Thanks! Already corrected.
– Leonel Sanches da Silva