You can also use shebang to run C# scripts like bash scripts https://devblogs.microsoft.com/dotnet/announcing-dotnet-run-...
I couldn't get the shebang to work by running the file directly with .net10 preview 4 sdk image.
It works if I run `dotnet run <file>`.
Update: It is working now, the file was using CRLF instead of LF.
That's great; now I can finally have scripts with type-safety. Note that on macOS the shebang either reads `#!/usr/local/share/dotnet/dotnet run` or `#!/usr/bin/env -S dotnet run`.
I couldn't get the shebang to work by running the file directly with .net10 preview 4 sdk image.
It works if I run `dotnet run <file>`.
Update: It is working now, the file was using CRLF instead of LF.
That's great; now I can finally have scripts with type-safety. Note that on macOS the shebang either reads `#!/usr/local/share/dotnet/dotnet run` or `#!/usr/bin/env -S dotnet run`.