static void Main(string[] args)
{
B b = new B(); // Делаю ссылку на класс B
<b>b.newMethod();</b>
Console.WriteLine(b.new_age); // Вывожу в консоль переменную new_age из класса B
Console.ReadKey();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace sekundomer
{
public partial class Form1 : Form
{
int m;
int s;
int ms;
public Form1()
{
InitializeComponent();
timer1.Interval = 500;
m = 0;
s = 0;
ms = 0;
label1.Text = "0";
label2.Text = "00";
label3.Visible = true;
}
private void button1_Click(object sender, EventArgs e)
{
if (timer1.Enabled)
{
timer1.Enabled = false;
button1.Text = "Пуск";
button2.Enabled = true;
button1.Text = "Стоп";
button2.Enabled = false;
}
else
label3.Visible = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (label3.Visible)
{
if (s < 59)
{
s++;
if (s < 10)
label2.Text = s.ToString();
}
else
{
m = 0;
label1.Text = "00";
}
}
label3.Visible = false;
}
}
}
if (sfd.ShowDialog() == DialogResult.OK);
if (saveFileDialog.ShowDialog() == DialogResult.OK)
pictureBox1.Refresh();
{
return saveFileDialog.FileName;
}
return "";
public interface IChild : IParent
{
new string Family { get; }
string Name { get; }
}
<configuration>
...
<system.webServer>
...
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="DELETE, GET, HEAD, OPTIONS, POST, PUT" />
<add name="Access-Control-Allow-Headers" value="Accept, Authorization, Content-Type, Origin, X-Requested-With" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>