if e.MidiEvent is an instance of NoteEvent, cast it to a NoteEvent, and then you have access to the NoteNumber property which is an int
if e.MidiEvent is an instance of ControlChangeEvent, cast it to a ControlChangeEvent, and then you have access to the ControllerValue property which is an int
The NAudioDemo app is just using the MidiEvent ToString(), but there is no reason for you to use it if you don't like the format it displays data in.