There are many resources on CodeProject for C# code to record sound. Here's a recent (April, 2014) article: "Play or Capture Audio Sound. Send and Receive as Multicast (RTP)" [
^].
The BASS library (free for non-commercial use) is very powerful library for all types of sound manipulation, and playback [
^]. There is a .NET API available with examples in C#: [
^].