O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Keywords in C#

Keywords are reserved and cannot be used as identifiers. If you really want to choose a C# keyword as an identifier name, prefix it with a @. [1] For example, @new is a legal identifier but new is not.

[1] Highly discouraged by myself - there are lots of other words you can choose for your identifiers.

Table A.1 shows the list of C# keywords, and the chapters in which they are described in this book. Of all the C# keywords, only extern and stackalloc are beyond the scope of this book.

Table A.1. C# keywords
KeywordCommentsChapter
abstractModifier – used to declare a class or class member as abstract6
asOperator – a convenient combination of the typeof and is operators10
baseUsed to invoke a constructor in the super(base)class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required