While there’s a free tool on Codeplex called Xsd2Code that gives you nice integration to Visual Studio’s right click menu to generate serialization class based on an XSD file, Visual Studio itself also includes a similar command line tool – the XML Schema Definition Tool (xsd.exe).
Once you have your XSD file generated from your XML file, open the Visual Studio Command Prompt and type:
xsd <YourFileName>.xsd /c /l:cs
This will generate a C# class in the same folder with the same name as your XSD file.
Type xsd /?
for more information about this tool or check the MSDN page.