C# Keywords (JNNC Technologies)


A keyword is a reserved word. You cannot use it as a variable name, constant name etc.
In C# keywords cannot be used as identifiers. However, if we want to use the keywords as identifiers, we may prefix the keyword with @ character.
A list of Reserved Keywords available in C# programming language is given below:
abstractbaseasboolbreakcatchcase
bytecharcheckedclassconstcontinuedecimal
privateprotectedpublicreturnreadonlyrefsbyte
explicitexternfalsefinallyfixedfloatfor
foreachgotoifimplicitinin (generic modifier)int
ulongushortuncheckedusingunsafevirtualvoid
nullobjectoperatoroutout (generic modifier)overrideparams
defaultdelegatedodoubleelseenumevent
sealedshortsizeofstackallocstaticstringstruct
switchthisthrowtruetrytypeofuint
abstractbaseasboolbreakcatchcase
volatilewhile
Some identifiers which have special meaning in context of code are called as Contextual Keywords.
A list of Contextual Keywords available in C# programming language is given below:

addgroupascendingdescendingdynamicfromget
globalaliasintojoinletselectset
partial (type)partial(method)removeorderby

No comments

If you have any doubts,please let me know

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();