0% found this document useful (0 votes)
52 views21 pages

Visual Studio 2015

The document discusses the features of the C# programming language. It lists 10 key features: 1) Simple, 2) Modern programming language, 3) Object oriented, 4) Type safe, 5) Interoperability, 6) Scalable and Updateable, 7) Component oriented, 8) Structured programming language, 9) Rich Library, 10) Fast speed. It then provides further details on each of these features, describing how C# is a simple, modern, object-oriented, type-safe language that is scalable, supports components, has a structured approach, offers a rich library, and has fast compilation and execution speeds.

Uploaded by

Esha Eraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views21 pages

Visual Studio 2015

The document discusses the features of the C# programming language. It lists 10 key features: 1) Simple, 2) Modern programming language, 3) Object oriented, 4) Type safe, 5) Interoperability, 6) Scalable and Updateable, 7) Component oriented, 8) Structured programming language, 9) Rich Library, 10) Fast speed. It then provides further details on each of these features, describing how C# is a simple, modern, object-oriented, type-safe language that is scalable, supports components, has a structured approach, offers a rich library, and has fast compilation and execution speeds.

Uploaded by

Esha Eraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Visual Studio 2015

Features of C#
C# is OOP language. It provides a lot of features that are given below.
1. Simple
2. Modern programming language
3. Object oriented
4. Type safe
5. Interoperability
6. Scalable and Updateable
7. Component oriented
8. Structured programming language
9. Rich Library
10. Fast speed
Features of C# (Cont.)
1) Simple
C# is a simple language in the sense that it provides structured approach (to break the problem into
parts), rich set of library functions, data types etc.
2) Modern Programming Language
C# programming is based upon the current trend and it is very powerful and simple for building
scalable, interoperable and robust applications.
3) Object Oriented
C# is object oriented programming language. OOPs makes development and maintenance easier where as in Procedure-oriented
programming language it is not easy to manage if code grows as project size grow.

4) Type Safe
C# type safe code can only access the memory location that it has permission to execute. Therefore it improves a security of
the program.

5) Interoperability
Interoperability process enables the C# programs to do almost anything that a native C++ application can do.
Features of C# (Cont.)
6) Scalable and Updateable
C# is automatic scalable and updateable programming language. For updating our application we
delete the old files and update them with new ones.
7) Component Oriented
C# is component oriented programming language. It is the predominant software development
methodology used to develop more robust and highly scalable applications.
8) Structured Programming Language
C# is a structured programming language in the sense that we can break the program into parts
using functions. So, it is easy to understand and modify.
9) Rich Library
C# provides a lot of inbuilt functions that makes the development fast.
10) Fast Speed
The compilation and execution time of C# language is fast.
Basic Syntax
• C# is an object-oriented programming language. In Object-Oriented Programming
methodology, a program consists of various objects that interact with each other by means
of actions. The actions that program consists of various objects that interact with each
other by means of actions. The actions that an object may take are called methods.
Objects of the same kind are said to have the same type or, an object may take are called
methods. Objects of the same kind are said to have the same type or, are said to be in the
same class.
• For example, let us consider a Rectangle object. It has attributes such as length and width.
Depending upon the design, it may need ways for accepting the values of these attributes,
calculating the area, upon the design, it may need ways for accepting the values of these
attributes, calculating the area, and displaying details.
Example
• Let us look at implementation of a Rectangle class and discuss C# basic syntax:
IDENTIFIERS
An identifier is a name used to identify a class, variable, function, or any other user-
defined item. The basic rules for naming classes in C# are as follows:

• A name must begin with a letter that could be followed by a sequence of letters,
digits (0 - 9) or underscore. The first character in an identifier cannot be a digit.

• It must not contain any embedded space or symbol such as? - + ! @ # % ^ & * ( ) [ ]
{ } . ; : " ‘ / and \. However, an underscore ( _ ) can be used.

• It should not be a C# keyword.


C# Keywords

Keywords are reserved words predefined to the C# compiler. These keywords cannot
be used as identifiers. However, if you want to use these keywords as identifiers, you
may prefix the keyword with the @ character.

• In C#, some identifiers have special meaning in context of code, such as get and set
are called contextual keywords.

• The following table lists the reserved keywords and contextual keywords in C# −
Description
class: is a keyword which is used to define class.
Program: is the class name. A class is a blueprint or template from which objects are created. It
can have data members and methods. Here, it has only Main method.
static: is a keyword which means object is not required to access static members. So it saves
memory.
void: is the return type of the method. It doesn't return any value. In such case, return statement
is not required.
Main: is the method name. It is the entry point for any C# program. Whenever we run the C#
program, Main() method is invoked first before any other method. It represents start up of the
program.
string[] args: is used for command line arguments in C#. While running the C# program, we can
pass values. These values are known as arguments which we can use in the program.
System.Console.WriteLine("Hello World!"): Here, System is the namespace. Console is the class
defined in System namespace. The WriteLine() is the static method of Console class which is used
to write the text on the console.

You might also like