Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
C# - Chap 1

C# - Chap 1



|Views: 1,766|Likes:
Published by mukeshnt
Lecture notes on programming language c#, (c sharp). Notes developed by Prof Mukesh N Tekwani, Mumbai. These notes are as per the latest syllabus of University of Mumbai , for B.Sc (IT) - Sem VI
Lecture notes on programming language c#, (c sharp). Notes developed by Prof Mukesh N Tekwani, Mumbai. These notes are as per the latest syllabus of University of Mumbai , for B.Sc (IT) - Sem VI

More info:

Published by: mukeshnt on Mar 31, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Page 1 of 3
C#, pronounced as C sharp, is a computer language used to give instructions that tell the computerwhat to do, how to do it, and when to do it. C# is one of the languages used in the Microsoft .NETFramework.You can program in C# by using
Visual C# 2005 Express Edition
, which is available as a freedownload from the Microsoft Web site athttp://msdn.microsoft.com/express/default.aspx 
Features of C# :
Object-oriented language
C# supports the three most important features of OOP i.e.,
nheritance, and
ncapsulation. (PIE). In C#, everything is an object.b.
There are no global functions, variables and constants.2.
: C# is a simple language.a.
It does not support the complicated features of C++ such as pointers, scope resolutionoperator (::)b.
Macros and templates are not supported in C# as these features cause errors in programs.c.
C++ has three different symbols for working with members: the (.) operator, the (:: )operator and the -> operator. In C#, all these are replaced by the dot operator (.).3.
: C# is a modern language. It supports the features of a.
garbage collection,b.
code security,c.
error handling features,d.
new approach to debugging,.4.
C# is
: It means the following:a.
C# arrays are bound unlike arrays in C and C++.b.
If uninitialized arrays are used, the compiler produces an error.c.
C# supports automatic garbage collection. Garbage collection is a form of automaticmemory management. The garbage collector tries to free the memory used by objects, thatwill never be accessed again by the application.d.
C# enforces overflow checking in arithmetic operations.e.
All dynamically objects and arrays are initialized to zero. (In C, uninitialized variables have junk value).5.
It has the best features of C++, Visual Basic and Java.6.
It is a
It is
from C & C++ languages. So it is easy to learn. Syntax is similar to that of C and C++8.
: It is Web-enabled i.e. suitable for Web applications.9.
.NET Framework
: It has been designed to support the .NET Framework.
Generated by Foxit PDF Creator © Foxit Softwarehttp://www.foxitsoftware.com For evaluation only.
Prof. Mukesh N. Tekwani Email: mukeshtekwani@hotmail.comPage 2 of 310.
C# is
: It can be used for diverse projects such as word-processors, graphicsapplications, spreadsheets, windows applications, and compilers for other languages.11.
: Versioning means the creation and management of multiple versions of a software.All versions have the same general function but they are improved, upgraded or customized. Newversions of software modules can work with existing applications. C# supports versioning with thekeywords called
: C# enforces the .NET common language specifications and allows inter operationwith other .NET languages such as VB .NET.
Shortcomings / Drawbacks of C++:
C++ is a complex language.2.
C++ is not truly object-oriented.3.
It is not suitable for Web technologies.4.
It does not support versioning.5.
It is not type-safe.6.
C++ supports pointers which can result in major errors in programs.
Differences between C# and C++ :
Although C# is derived from C++, there are many differences between these two languages. These are:1.
C# does not support the
C# does not support pointer types.3.
C# supports a native Boolean data type.4.
The entry point of both C# and C++ programs is a main method. In C#, the main method is writtenas
(beginning with capital M), while in C++, the main method is written as
(startingwith small m).5.
C# supports four iteration statements rather than three in C++. The fourth statement is called
C# can check overflow of arithmetic operations and conversions.7.
C# compiles from source code to object code. Object files are not produced.8.
All basic value types will have the same size on any system. This is not the case with C or C++.Therefore C# is more suitable for writing distributed applications.9.
C# checks for uninitialized variables and gives error messages at compile time. In C++, anuninitialized variable is not detected and causes errors in the output.10.
Arrays are classes in C# and operations such as sorting, reversing, and searching can be carried out.11.
Type casting in C# is safer than in C++.12.
C# does not allow silent fall through in switch statements. We must give an explicit jump statementat the end of each case statement.
Generated by Foxit PDF Creator © Foxit Softwarehttp://www.foxitsoftware.com For evaluation only.

Activity (18)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Saravanan Pa liked this
Sri Bharathi liked this
Rahul Birthariya liked this
ssssv liked this
Jojo Cansino liked this
Ramesh Bharti liked this
prerendu liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->