c# පොඩි උදව්වක් ඔිනේ

janakait

Junior member
  • Feb 22, 2015
    51
    3
    8
    c# පොඩි උදව්වක් ඔිනේ

    c# .



    මේකේ nu1 සහ nu2 ඒකතු කරාම total ඒක පෙන්නපුවාම පල්ලේ තියන full invoice total ඒකට ඒකතු වෙන්න ඔිනේ.

    නැවත number 2k දීලා ඒකතු කලවිට පල්ලේ තියන full invoice total කලින් ගනනට ඒකතු වෙන්න ඔිනේ....

    full invoice total eka kohomda mcnla karanne

    :no::no::no::no::shocked::shocked:
     
    Last edited:
    • Like
    Reactions: WhiteWalker

    tery123

    Well-known member
  • Feb 25, 2011
    6,031
    177
    63
    34
    c# .



    මේකේ nu1 සහ nu2 ඒකතු කරාම total ඒක පෙන්නපුවාම පල්ලේ තියන full invoice total ඒකට ඒකතු වෙන්න ඔිනේ.

    නැවත number 2k දීලා ඒකතු කලවිට පල්ලේ තියන full invoice total කලින් ගනනට ඒකතු වෙන්න ඔිනේ....

    full invoice total eka kohomda mcnla karanne

    :no::no::no::no::shocked::shocked:

    full invoice total eka global variable ekak kalanan hari neda???:dull::dull::dull::dull:
     

    chathuvv

    Well-known member
  • Jun 28, 2008
    3,308
    642
    113
    store the full invoice value in to variable and add the sum to the above variable at the button click event
     

    aravinda145

    Well-known member
  • Nov 19, 2006
    1,052
    156
    63
    Code:
     public partial class Form1 : Form
        {
            int invoice = 0;
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                int no1 = Convert.ToInt32(txtno1.Text);
                int no2 = Convert.ToInt32(txtNo2.Text);
    
                int total = no1 + no2;
                txtTotal.Text = total.ToString();
    
                invoice += total;
    
                txtInvoice.Text = invoice.ToString();
            }
        }
     
    • Like
    Reactions: Muditha Sandun

    janakait

    Junior member
  • Feb 22, 2015
    51
    3
    8
    Code:
     public partial class Form1 : Form
        {
            int invoice = 0;
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                int no1 = Convert.ToInt32(txtno1.Text);
                int no2 = Convert.ToInt32(txtNo2.Text);
    
                int total = no1 + no2;
                txtTotal.Text = total.ToString();
    
                invoice += total;
    
                txtInvoice.Text = invoice.ToString();
            }
        }

    හරි මචන්..... thaknz mcoo:):):):):):)