Keyword in C#

 

Keywords :- C# contains reserved words that have special meaning for the compiler. These reserved words are called "keywords". Keywords cannot be used as an identifier (name of a variable, class, interface, etc.).

Keywords in C# are distributed under the following categories:

#Modifier Keywords:-Modifiers allow or prevent certain parts of programs from being modified by other parts.

abstract,const,readonly,new,virtual,override,sealed,static.

#Access Modifier Keywords:-Access modifiers are applied to the declaration of the class, method, properties, fields, and other members. They define the accessibility of the class and its members.

private,public,protected,internal.

#Contextual keywords:- A contextual keyword is used to provide a specific meaning in the code, but it is not a reserved word in C#. Some contextual keywords, such as partial and where, have special meanings in two or more contexts.

async,await,yield,var,dynamic,partial

#Statement Keywords:-Statement keywords are related to program flow.

if,else,while,switch,for, foreach,in,throw, try,catch, finally.

#Parameter Keywords:-These keywords are applied to the parameters of a method.

params,ref,out,in

#Namespace Keywords:-

using, .operator , :: operator.

No comments:

Post a Comment