There is a built-in way but that is a bad way,
Read here: http://msdn.microsoft.com/en-us/library/ms682022.aspx
The 1st example is the easy way that code is bad ( as you can see from void main() )
The second example is a bit more complicated but it's better