public void TestSumOfN() { KPO.Math ss = new KPO.Math(); int test = ss.SumOfN(10); Assert.AreEqual(test, 55); }
static void Main(string[] args) { Math mt = new Math(); var ss = mt.SumOfN(10); Console.WriteLine(ss); var users = new Users(new TableData()); var result = users.GetAll(); var result2 = users.GetFirstItem(); var result3 = users.GetUserByName("boris"); var result4 = users.GetUserByAddres("Doma"); }
private void button1_Click(object sender, EventArgs e) { KPO.Math izračuni = new KPO.Math(); try { Convert.ToInt32(textBox1.Text); } catch { MessageBox.Show("Napačne vrednosti!"); return; } var result = izračuni.SumOfN(Convert.ToInt32(textBox1.Text)); label2.Text = "Vrednost je " + result; }