C Sharp syntax
Let us have a Short look on
syntax of the C Sharp programming language. C sharp syntax are main features of
fundamental C sharp programming.
Identifier
An identifier is the name of an element in the code.
Variables
Variables are identifiers associated with values. They are declared by
writing the variable's type and name, and are optionally initialized in the
same statement.
Constants
Constants are immutable values. and there value does not change .They are
initialized when declared.
Readonly
The readonly keyword does a similar thing to fields. Like fields marked
as const they cannot change once initialized. The difference is that you can
choose to initialize them in a constructor. This only works on fields.
Read-only fields can either be members of an instance or static class members.
Code blocks
The operators { ... } are used to signify a code block and a new
scope. Class members and the body of a method are example
C Sharp syntax
Reviewed by Admin
on
02:54:00
Rating:
No comments: