-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(csharp) Add all v9 keywords, and other missing keywords (#2679)
* Added C# 9 keywords, and other missing keywords. - Improved organization, and added built-ins
- Loading branch information
1 parent
da7d149
commit d7b1ede
Showing
11 changed files
with
154 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<span class="hljs-keyword">float</span> test = <span class="hljs-number">1.0f</span>; | ||
<span class="hljs-keyword">float</span> test2 = <span class="hljs-number">1.f</span>; | ||
<span class="hljs-keyword">float</span> test3 = <span class="hljs-number">1.0</span>; | ||
<span class="hljs-keyword">float</span> test4 = <span class="hljs-number">1</span>; | ||
<span class="hljs-built_in">float</span> test = <span class="hljs-number">1.0f</span>; | ||
<span class="hljs-built_in">float</span> test2 = <span class="hljs-number">1.f</span>; | ||
<span class="hljs-built_in">float</span> test3 = <span class="hljs-number">1.0</span>; | ||
<span class="hljs-built_in">float</span> test4 = <span class="hljs-number">1</span>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">record</span> <span class="hljs-title">MyRecord</span> | ||
{ | ||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">string</span> SomeMember { <span class="hljs-keyword">get</span>; <span class="hljs-keyword">set</span>; } | ||
<span class="hljs-keyword">public</span> <span class="hljs-built_in">string</span> SomeMember { <span class="hljs-keyword">get</span>; <span class="hljs-keyword">init</span>; } | ||
} | ||
|
||
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">record</span> <span class="hljs-title">Person</span>(<span class="hljs-params"><span class="hljs-built_in">string</span> FirstName, <span class="hljs-built_in">string</span>? MiddleName, <span class="hljs-built_in">string</span> LastName</span>)</span>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
public record MyRecord | ||
{ | ||
public string SomeMember { get; set; } | ||
public string SomeMember { get; init; } | ||
} | ||
|
||
public record Person(string FirstName, string? MiddleName, string LastName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters