C# mempunyai kata-kata tercadang (Reserved Word) yang jumlahnya relatif lebih banyak daripada bahasa pemrograman umum lainnya, berikut ini adalah tabel kata-kata tercadang yang dimiliki oleh C#.
C# keywords, reserved words | |||
abstract | as | base | bool |
break | by 2 | byte | case |
catch | char | checked | class |
const | continue | decimal | default |
delegate | do | double | descending 2 |
explicit | event | extern | else |
enum | false | finally | fixed |
float | for | foreach | from 2 |
goto | group 2 | if | implicit |
in | int | interface | internal |
into 2 | is | lock | long |
new | null | namespace | object |
operator | out | override | orderby 2 |
params | private | protected | public |
readonly | ref | return | switch |
struct | sbyte | sealed | short |
sizeof | stackalloc | static | string |
select 2 | this | throw | true |
try | typeof | uint | ulong |
unchecked | unsafe | ushort | using |
var 2 | virtual | volatile | void |
while | where 2 | yield 1 |
|
1, 2 These are not actually keywords, thus (unlike actual keywords) it is possible to define variables and types using these names, but they act like keywords in certain new language constructs introduced in C# 2.0(1) and 3.0(2). |
Konco Blog
-
IT Solution: Mengembalikan file yang terhapus menggunakan Get D...10 tahun yang lalu