Для программы определено несколько точек входа
Для программы определено несколько точек входа. Компиляция с /main позволит указать тип содержащий точку входа
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 WindowsFormsApp4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.Size = new Size(600, 600);
this.Paint += new PaintEventHandler(Form1_Paint);
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
int centerX = this.ClientSize.Width / 2;
int centerY = this.ClientSize.Height / 2;
int radius = this.ClientSize.Width / 4;
for (int i = 0; i < 9; i++)
{
e.Graphics.DrawEllipse(Pens.Black, centerX - radius, centerY - radius, 2 * radius, 2 * radius);
radius += 20;
}
}
static void Main()
{
Application.Run(new Form1());
}
}
}
Источник: Stack Overflow на русском