First, you must do the following things to start writing code.
1 download DirectX9.c version
2 There is a vs.net development tool in the system
3 Start a C # project, point items -> Add reference -> Add Microsoft.DirectX and Microsoft.directX.DRIECT3D to the project
Then find the namespace, point to add
4 Add code in the project Using Microsoft.directX; using microsoft.directx.driect3d;
Ok, let's we can formal start writing code.