protected void ButtonCall_Click(object sender, EventArgs e) { if (TextBoxCallCount.Text != "") { TextBoxResult.Text = ""; uint callCount; TextBoxResult.Text = UInt32.TryParse(TextBoxCallCount.Text, out callCount) ? jediClient.SayHi(callCount, "") : "Invalid call count"; } }
public string SayHi(uint greetingsCounter, string log) { if (greetingsCounter != 0) { log += "General Kenobi... (left: " + (greetingsCounter - 1) + " greets)\r\n"; return(kenobi.SayHi(greetingsCounter - 1, log)); } else { return(log); } }