
ПРЕЗЕНТАЦИЯ_С# / си / ИСПОЛЬЗОВАНИЕ_БИБЛИОТЕКИ_СБОРКИ
.docusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace m1
{
public class B1
{
public static double summa(double a, double b)
{
double c = a + b;
return c;
}
public static double umn(double a, double b)
{
double u = a * b;
return u;
}
}
}
----------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using m1; //
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
double t = Convert.ToDouble(textBox1.Text);
double z = Convert.ToDouble(textBox2.Text);
double c = B1.summa(t, z); //
textBox3.Text = Convert.ToString(c);
}
private void button2_Click(object sender, EventArgs e)
{
double tt = Convert.ToDouble(textBox1.Text);
double zz = Convert.ToDouble(textBox2.Text);
double u = B1.umn(tt, zz); //
textBox3.Text = Convert.ToString(u);
}
private void button3_Click(object sender, EventArgs e)
{
//Application.Exit();
Close();
}
}
}