C#C
C#3y ago
Gijs

✅ C# webforms counting problem

Hey I'm new to c# I have been working with c# for 3 days now but I stummbeld on a problem I can't get fixed

public int counter = 3;

MessageBox.Show("You have" + counter - 1 + "Tries left");


once I do this I get the error: Operator '-' cannot be applied to operands of type 'string' and 'int'. And I have no idea how to fix it. It's probarlly something really simple but I just can't seem to get it
Was this page helpful?