C# increment ToString
I add an unexpected behaviour from C#/WPF private void ButtonUp_Click(object sender, RoutedEventArgs e) { int quant; if( int.TryParse(Qnt.Text, out quant)) { string s = ((quant++).ToString()); Qnt.Text = s; } } So, if I get quant as 1, quant will be incremented to 2. But the s string will be 1. Is this a question of precedence? EDIT: I re-wrote this as: quant++; Qnt.Text = quant.ToString(); and now this works as I expected. You are using the post -increment operator. This evalutates to the original value, and then increments. To do what you want in a one-liner you can use the pre -increment