Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some problems encountered in copying code LA from Linqpad
#6
Code:
Copy      Help
script.setup(trayIcon: true, sleepExit: true);

is top-level-statements. The C# compiler converts it to classic C# code like
 
Code:
Copy      Help
class Program {
static void Main() {
script.setup(trayIcon: true, sleepExit: true);
}}

Then the compilation contains 2 class Program.

Either remove
 
Code:
Copy      Help
class Program {
    static void Main(string[] args) {

and } and }

or move
 
Code:
Copy      Help
script.setup(trayIcon: true, sleepExit: true);

to Main.


Messages In This Thread
RE: Some problems encountered in copying code LA from Linqpad - by Gintaras - 10-13-2022, 02:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)