Unless c# provides a way... not really. I believe there are a few more methods, but this is the most common way to do such a thing. Really I actually found an article here on codeguru that does it this way.

http://www.codeguru.com/Cpp/W-P/dll/article.php/c105/