-
I could not find a documented convention what is right nullable annotation for C# Main() entry point: public static int Main(string[] args);
public static int Main(string?[] args);
public static int Main(string[]? args);
public static int Main(string?[]? args); (Side question: in 3 and 4 lines syntax highlighting does not work in GitHub and VS Code - where to report? Roslyn repo? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Beta Was this translation helpful? Give feedback.
-
It should be the first one: |
Beta Was this translation helpful? Give feedback.
-
Thanks! Could you please convert this in a documentation issue? |
Beta Was this translation helpful? Give feedback.
-
It might be better, I think, to find the documentation page you think should be updated, and then use the "Feedback" section at the bottom. That submits an issue to the right repo, and also adds in a bunch of tracking information to link the issue to the right doc page. |
Beta Was this translation helpful? Give feedback.
-
GitHub uses the same grammar set as Linguist for markdown code blocks which specifies atom/language-csharp for C# syntax highlighting which in turn uses dotnet/csharp-tmLanguage which in turn has this issue: dotnet/csharp-tmLanguage#157 which has a linked PR dotnet/csharp-tmLanguage#175 that has gone stale for reasons that are not apparent. I imagine csharp-tmLanguage is what vscode uses as well, but according to dotnet/vscode-csharp#3404 you can enable the Semantic Highlighting Preview to get better highlighting. TL;DR: Turn on semantic highlighting in vscode and subscribe to dotnet/csharp-tmLanguage#157 |
Beta Was this translation helpful? Give feedback.
-
Depends on whether |
Beta Was this translation helpful? Give feedback.
It should be the first one:
public static int Main(string[] args);