You need to remove the Class around the method main
static void Main()
{
UnitConverter FeetToInchesConverter = new UnitConverter(12);
Console.WriteLine(FeetToInchesConverter.Convert(10));
}
The Main
method is part of the internal class UserQuery
and it is used as entry point for your script. So, if you hide it inside your own class then, probably, LinqPAD cannot find the entry point. What happen next is probably some invalid reference. For example, if you remove all the code of the class Test (Main included) LimqPAD raises the same error