repl.it is an online compiler used for compiling and running codes of various languages like Python , javascript etc.

At the moment there is no template for mono with winforms. To get that I used polygott

Polygott is a lot more flexible than other templates from repl.it.

I don't know how to initiate a new polygott template, so I did a fork of an existing one.

I did a fork of https://repl.it/@SPQR/Template-for-compilation-options.

And change the Makefile for this:

.PHONY: run

run:
	killall polygott-x11-vnc || true
	polygott-x11-vnc
	xrandr -s 800x600
	DISPLAY=:0
	csc hello.cs -r:System.Windows.Forms.dll
	chmod 744 /home/runner/hello.exe
	DISPLAY=:0.0 mono hello.exe

For test I used the file hello.cs:

using System;
using System.Drawing;
using System.Windows.Forms;
 
public class HelloWorld : Form
{
    static public void Main ()
    {
        Application.Run (new HelloWorld ());
    }
 
    public HelloWorld ()
    {
        Button b = new Button ();
        b.Text = "Click Me!";
        b.Click += new EventHandler (Button_Click);
        Controls.Add (b);
    }
 
    private void Button_Click (object sender, EventArgs e)
    {
        MessageBox.Show ("Button Clicked!");
    }
}

And here is embedded the result: