Well, MSDN is free on the web so your reference isn't a problem.
The .NET Framework and compiler are free too.
Visual Studio is not free but that is just a development environment. You can write code with just notepad and some of the books out there do just that as they are teaching c# and not how to use the VS IDE.
So you sure can but it is much easier with Visual Studio.
EDIT Ack! I forgot c# Express - Show how easy you can get hooked to 'Da Man!'