print square of asterisks on the rich text box..
Hey ,
I am beginner at c#.. and was wondering as how to print square of asterix's when i enter say length fo side in the text box in the forms window .. I want the square of Asterix's of the side inputted by the user in the text box to be displayed in the rich text box which i have constructed in the windows form..
the way i am trying to do is
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
int side = Int32.Parse(textBox1.Text);
int squareside= Square (side);
richTextBox1.Text = "int side"+ squareside ;
}
public int Square (int side)
{
return side*side;
}
it does print outs the square of the number inputted in the text box to the rich text box but not the asterix's ..
Please help!!!
Cheers!!
Andy
sbugigPosted Oct 7, 2004, 8:58 AM
shimtannyPosted Oct 7, 2004, 7:48 AM
andy4442093Posted Oct 7, 2004, 6:32 AM
sbugigPosted Oct 7, 2004, 5:00 AM
shimtannyPosted Oct 7, 2004, 3:45 AM
shimtannyPosted Oct 7, 2004, 3:43 AM