hola primero creas un clase desde el menu Proyecto/Agregar Clase
la nombras A y te quedara asi, solo le agregas la libreria de Windows.Forms
using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; namespace xopExample { class a { public void mensaje() { MessageBox.Show("hola"); } } }
en tu form agregas un boton .
private void button1_Click(object sender, EventArgs e) { a claseA = new a(); claseA.mensaje(); } Saludos