Skip to content

[Proposal]: Ignored Directives Support (VS 18.0, .NET 10) #8617

@333fred

Description

@333fred

Ignored Directives Support

Summary

As we move to allow C# statements in the top level of a file, it's reasonable to assume that we might someday get support for dotnet runing a .cs file. For further use of C# as a scripting language in this vein, I propose that we introduce a new preprocessor directive who's purpose is to exist solely to be ignored by the language: the hashbang directive. Linux and Unix scripts will often use #! in order to direct the program loader to the interpreter that can run them. We should add a similar ignore to the C# language.

Design meetings

Metadata

Metadata

Assignees

Labels

Implemented Needs ECMA SpecThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationProposal champion

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions