Definition – What does C# (C Sharp) mean?
C# is a general object-oriented programming (OOP) language for networking and Web development. C# is specified as a common language infrastructure (CLI) language.
In January 1999, Dutch software engineer Anders Hejlsberg formed a team to develop C# as a complement to Microsoft’s NET framework. Initially, C# was developed as C-Like Object Oriented Language (Cool). The actual name was changed to avert potential trademark issues. In January 2000, NET was released as C#. Its NET framework promotes multiple Web technologies.
The term is sometimes spelled as C Sharp or C-Sharp.
The term’s # character derives its name from the musical sharp key, which denotes a one semitone pitch increase. C# is pronounced “see sharp.”
~C# improved and updated many C and C++ features, including the following:
~C# has a strict Boolean data variable type, such as bool, whereas C++ bool variable types may be returned as integers or pointers to avoid common programming errors.
~C# automatically manages inaccessible object memory using a garbage collector, which eliminates developer concerns and memory leaks.
~C# type is safer than C++ and has safe default conversions only (for example, integer widening), which are implemented during compile or runtime.
No implicit conversions between Booleans, enumeration members and integers (other than 0) may be converted to an enumerated type. User-defined conversions must be specified as explicit or implicit, versus the C++ default implicit conversion operators and copy constructors.
C#’s principal designer and lead architect at Microsoft is Anders Hejlsberg, who was previously involved with the design of Turbo Pascal, Embarcadero Delphi (formerly CodeGear Delphi, Inprise Delphi and Borland Delphi), and Visual J++. In interviews and technical papers he has stated that flaws in most major programming languages (e.g. C++, Java, Delphi, and Smalltalk) drove the fundamentals of the Common Language Runtime (CLR), which, in turn, drove the design of the C# language itself.
· Private setters (properties)
· Method group conversions (delegates)
· Covariance and Contra-variance
- Implicitly typed local variables
- Object and collection initializers
- Auto-Implemented properties
- Anonymous types
- Extension methods
- Query expressions
- Lambda expressions
- Expression trees
- Partial Methods
· Named and optional arguments
· Generic co- and contravariance
· Embedded interop types (“NoPIA”)
· Compiler-as-a-service (Roslyn)
· Import type members into namespace
· Succinct syntax for primary constructors
· Property expressions (property lambdas)
· Parameter arrays for IEnumerable interfaces
Constructor type inference
C# has the following syntax:
- Semicolons are used to denote the end of a statement.
- Curly braces are used to group statements. Statements are commonly grouped into methods (functions), methods into classes, and classes intonamespaces.
- Variables are assigned using an equals sign, but compared using two consecutive equals signs.
- Square brackets are used with arrays, both to declare them and to get a value at a given index in one of them.
C# IS A CASE SENSITIVE LANGUAGE WHERE WE NEED TO FOLLOW THE PROPER CASE
Example :- The Author Of This Blog Is Siva Krishna
That Means the first letter of the word should be capital which we call it as PROPER CASE
- All The Keywords must be used in lower case only.
- While consuming the predefined libraries names of the classes and their members must be used in Proper Case i.e., first letter of the word must be Upper Case.
NOTE: While defining our own classes and members under the classes we can use any case to define them but adopting Proper Case will be the good convention .