Can you program games in C# like you do with C++.

For example with directX or OpenGL ?