I have a curve fitting algorithm in templated C++ and I want to use it in my C# project.

I need to figure out what I need to do to use this code without translating it into C#.

I'm told I could make a component out of it, but I don't know how.
I was told something about 'unsafe' code... don't know how...
Help?