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;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Ctverec c = new Ctverec();
c.Obsah(10,15);
c.Obvod(10,15);
textBox1.Text = c.obvod.ToString();
textBox2.Text = c.obsah.ToString();
}
}
public class Ctverec
{
public int obvod, obsah;
public void Obvod(int a, int b)
{
obvod = 2 * a + 2 * b;
}
public void Obsah(int a, int b)
{
obsah = a * b;
}
}
}
Děkuju moc.