×
Hard work beats talent when talent doesn’t work hard.
--Your friends at LectureNotes
Close

Dot Net Framework for Application Development

by Adarsh Lakshetty
Type: NoteInstitute: Visveswaraya Technological University Specialization: Computer Science EngineeringOffline Downloads: 150Views: 5626Uploaded: 9 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments

Contributors

Adarsh Lakshetty
Adarsh Lakshetty
Dot Net Framework for Application Development CBCS V Semester Subject code :15CS564 Dot Net Framework for Application Development CBCS V Semester Subject code :15CS564 Department of CSE MODULE I INTRODUCING MICROSOFT VISUAL C# & MICROSOFT VISUAL STUDIO 2015: Welcome to C# C# is pronounced as "C-Sharp". It is an object-oriented programming language provided by Microsoft that runs on .Net Framework.By the help of C# programming language, we can develop different types of secured and robust applications: Window applications, Web applications, Distributed applications, Web service applications, Database applications etc. C# is approved as a standard by ECMA and ISO. C# is designed for CLI (Common Language Infrastructure). CLI is a specification that describes executable code and runtime environment. C# programming language is influenced by C++, Java, Eiffel, Modula-3, Pascal etc. languages. C++ vs C# C# History History of C# language is interesting to know. Here we are going to discuss brief history of C# language. C# is pronounced as "C-Sharp". It is an object-oriented programming language provided by Microsoft that runs on .Net Framework. Anders Hejlsberg is known as the founder of C# language. It is based on C++ and Java, but it has many additional extensions used to perform component oriented programming approach. C# has evolved much since their first release in the year 2002. It was introduced with .NET Framework 1.0 and the current version of C# is 5.0. Let's see the important features introduced in each version of C# are given below. Prof Adarsh L , Dept of CSE BKEC, Basavakalyan Page 1
Dot Net Framework for Application Development CBCS V Semester Subject code :15CS564 C# Features C# is object oriented programming language. It provides a lot of features that are given below. Simple ,Modern programming language, Object oriented, Type safe, Interoperability, Scalable and Updateable, Component oriented, Structured programming language, Rich Library & Fast speed. 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 Prof Adarsh L , Dept of CSE BKEC, Basavakalyan Page 2
Dot Net Framework for Application Development CBCS V Semester Subject code :15CS564 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. 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. C# Example: Welcome program In C# programming language, a simple " Welcome program " program can be written by multiple ways. Let's see the top 4 ways to create a simple C# example: Simple Example Using System Using public modifier Using namespace Prof Adarsh L , Dept of CSE BKEC, Basavakalyan Page 3
Dot Net Framework for Application Development CBCS V Semester Subject code :15CS564 C# Simple Example include all 4 ways using System; namespace CSE { public class Program { public static void Main(string[] args) { .Net framework Namespace Methods Data type Class name Console.WriteLine("Welcome to CSE "); } Methods to display value on Console } } Output: Welcome to CSE department 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 does'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("Welcome to CSE department "): 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. Example: Simple Console Project with C# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CSharp Prof Adarsh L , Dept of CSE BKEC, Basavakalyan Page 4

Lecture Notes