As Habib says, you need to put the code in methods, constructors, etc. In this case, if the code you need is exactly what you want as an entry point, you just need to:
using System; using WindowsInstaller; class Program {
Basically, the Main method is the entry point for a standalone program in C #.
Of course, if your code is designed to connect to something else, you may just need to implement an interface or something like that. In any case, you will have to have the code in the members, and not just "naked".
source share