1:计算器
        try
        {
            double a = Convert.ToDouble(TextBox1.Text);
            double b = Convert.ToDouble(TextBox2.Text);
            if (DropDownList1.SelectedValue == "")
            {
                Label1.Text = Convert.ToString(a+b);
            }
            else if (DropDownList1.SelectedValue == "")
            {
                Label1.Text = Convert.ToString(a - b);
            }
            else if (DropDownList1.SelectedValue == "")
            {
                Label1.Text = Convert.ToString(a * b);
            }
            else
            {
                Label1.Text = Convert.ToString(a/b);
            }
        }
        catch
        {
            Label1.Text = "请输入数字";
        }
例2:数字乘法表
        Label1.Text = "";
        int sum = 0;
        for (int i = 1; i <= 9; i++)
        {
            for (int j = 1; j <= i; j++)
            {
                sum = i * j;
                Label1.Text +=i.ToString()+"x"+j.ToString()+"="+sum.ToString()+" ";
            }
            Label1.Text +="</br>";
        }
例3:乘法口诀表
        Label1.Text = "";
        int sum = 0;
        string[] biao = { """""""""""""""""""" };
        string s1;
        string s2;
        for (int i = 1; i <= 9; i++)
        {
            for (int j = 1; j <= i; j++)
            {
                sum = i * j;
                if (sum < 10)
                {
                    Label1.Text += biao[i] + biao[j] + "" + biao[sum] + "  ";
                }
                else
                {
                    if (sum % 10 != 0)
                    {
                        s1 = sum.ToString().Substring(0, 1);
                        s2 = sum.ToString().Substring(1, 1);
                        Label1.Text += biao[i] + biao[j]+biao[Convert.ToInt32(s1)] +""+ biao[Convert.ToInt32(s2)] + "  ";
                    }
                    else
                    {
                        s1 = sum.ToString().Substring(0, 1);
                        s2 = sum.ToString().Substring(1, 1);
                        Label1.Text += biao[i] + biao[j]+ biao[Convert.ToInt32(s1)]+biao[Convert.ToInt32(s2)] + "  ";
                    }
                }
            }
            Label1.Text += "</br>";