Do something like this:
string message = e.MidiEvent.ToString(); if (e.MidiEvent is NoteEvent) { NoteEvent n = (NoteEvent)e.MidiEvent; message = String.Format("{0} {1} Ch: {2} Note:{3} Vel:{4}", n.AbsoluteTime, n.CommandCode, n.Channel, n.NoteNumber, n.Velocity); } else if (e.MidiEvent is ControlChangeEvent) { ControlChangeEvent c = (ControlChangeEvent)e.MidiEvent; message = String.Format("{0} {1} Ch: {2} Controller:{3} Value:{4}", c.AbsoluteTime, c.CommandCode, c.Channel, (int)c.Controller, c.ControllerValue); } MessageBox.Show(message);