AForge.NET is an open-source library with Fast Fourier Transform support.
ExocortexDSP is also another option.
ExocortexDSP example would look something like this:
Exocortex.DSP.ComplexF[] complexData = new Exocortex.DSP.ComplexF[512];
for (int i = 0; i < 512; ++i)
{
// Fill the complex data
complexData[i].Re = 1; // Add your real part here
complexData[i].Im = 2; // Add your imaginary part here
}
// FFT the time domain data to get frequency domain data
Exocortex.DSP.Fourier.FFT(complexData, Exocortex.DSP.FourierDirection.Forward);
float[] mag_dat_buffer = new float[complexData.Length];
// Loop through FFT'ed data and do something with it
for (int i = 0; i < complexData.Length; ++i)
{
// Calculate magnitude or do something with the new complex data
mag_data_buffer[i] = ImaginaryNumberMagnitude(complexData[i].Im, complexData[i].Re);
}