<p>Has anybody out there used the <a href="http://www.swig.org/exec.html" rel="noreferrer">SWIG</a> library with C#?  If you have, what pitfalls did you find and what is the best way to use the library?  I am thinking about using it as a wrapper for a program that was written in C and I want to wrap the header files where I can use them in my .NET application.</p>
Edit:  Some clarification on target OS's.
<p>I plan on running the application on Linux and Windows, therefore the reason I am looking into SWIG.  P/Invoke is not an option.</p>

I did attempt to use SWIG to wrap a project C++ for using in .NET a few years ago.
I didn't get very far as it was a massive giant pain to produce the configuration that SWIG required. At the time I just wanted a solution, not to learn another language/api/etc. SWIG may be easier to use these days, I couldn't tell you.
We ended up using Managed C++ to wrap the C++ project. It worked really well.
If you're just invoking functions straight out of a dll, I'd suggest not worrying about either of the above, and just using
P/Invoke