C# (.NET) does not have a MIDI API. The only API available on Windows is the old Multi-Media library AFAIK.
Check out MIDI.NET that wraps this Windows API and makes it available to .NET (C#,VB.NET, etc.).
It provides a Factory object to create (pooled) note messages and includes reading and saving MIDI files.
If you have any questions post them in the discussion list on the codeplex project site.
Hope it helps, Marc (Author of MIDI.NET)