23
Microsoft Visual Studio and C# Programming A Team 2 Technical Presentation Vadim Kim Kirk Guotana Adam Partlo Shreyas Thiagarajasubramanian

Microsoft Visual Studio and C# Programming

  • Upload
    huong

  • View
    93

  • Download
    0

Embed Size (px)

DESCRIPTION

Microsoft Visual Studio and C# Programming. A Team 2 Technical Presentation Vadim Kim Kirk Guotana Adam Partlo Shreyas Thiagarajasubramanian. History of Computer Programming. First program and algorithm Analytical engine . Charles Babbage (1791-1871). Difference Engine. - PowerPoint PPT Presentation

Citation preview

Programming in C#

Microsoft Visual Studio and C# ProgrammingA Team 2 Technical PresentationVadim KimKirk GuotanaAdam PartloShreyas ThiagarajasubramanianCHANGE THE STUPID TITLEHistory of Computer ProgrammingFirst program and algorithmAnalytical engine

Charles Babbage (1791-1871)Difference EngineWhat is a Program?Artificial language with instructionManipulation of variablesInput and output

ADD PICTUREProgram Example

Program Major ComponentsSyntax

Semantics

ADD PICTURESIntroduction to C#Started in 1999C.O.O.L.Led by Anders HejlsbergDirect competitor with JavaReadableCurrent version: C# 4.0C# 5.0 expectedOOP

Andy C#s Mascot (Retired in 2004)What Is OOP?Object oriented programmingDefined by objectsState (Fields)Behavior (Methods)Classes

Example

Object: Jeep SUV

Fields:Current SpeedCurrent GearCurrent TransmissionMethods:Speed Up / Apply BrakesChange GearChange Transmission (4x2 / 4x4)Example (cont.)Object Definition:

class SUV { private: int currentSpeed;int currentGear;int currentTransmission; public:void SpeedUp(int);void ApplyBrakes(int);void Change Transmission(int);void PrintStates(void);} How to use object:

// Define objects SUV Jeep = new SUV(); // Methods on objectJeep.SpeedUp(10); Jeep.ChangeGear(2); Jeep.ChangeTransmission(4); Jeep.PrintStates();

Change this, ask Shreyas for help.9Benefits of C#Managing memory in C/C++Responsibility of the programmerNeed to allocate resources for objectsResources must be released when finished

Garbage Collection in C#Handled by common language runtime (CLR)Provided by .Net FrameworkRuns code and provides servicesPeriodically checks memory heapReleases resources held by unreferenced objects

Benefits of C# (cont.).Net FrameworkConsistent programming modelSupports building and running the next generation of applications and XML web services

Extremely easy to write C# in visual studio (VS)Visual designers to create applications with GUIs

.Net FrameworkSix Major Objectives1) Consistent object-oriented programming environment

Code-execution environment that 2) Minimizes software deployment3) Promotes safe execution of code4) Eliminates the performance problems of scripted environments

5) Developer experience consistent across widely varying types of applications

6) Build all communication on industry standards

12Visual DesignersWindows Forms Designer

Visual Designers (cont.)Windows Presentation Foundation (WPF) DesignerIntroduced with Visual Studio 2008Supports Drag and Drop

Provides flexibility by using XAML An XML based markup language to describe the UIC# code is separated from the XAML markup

Visual Designers (cont.)Class designerAuthor and edit the classes using UML modeling

Visual Designers (cont.)Data designerGraphically edit database schemasDesign queries from the graphical view

Web designer/developmentASP.NET applications

.NET FrameworkA framework with which applications can be made for a variety of Microsoft platforms

Very easy to use, and code can be shared between platformsExample: A game built for Windows can be very easily ported to XBox360

Windows Phone 7Windows Phone 7 apps can be made with Visual Studio and C#

Web ApplicationsASP.NET, Microsofts web application framework, is also integrated with C# and VS

Netduino ApplicationsNetduino Applications can be made with C#, VS, and the .NET Micro framework

VideoApp Demo

ConclusionC# is a very popular and rapidly growing language

Backed by a large company, it will continue to evolve alongside the technologies of the future

It is very easy to learn, very fast to develop in, and very well integrated with a variety of platforms through .NET and VSWindows, Windows Phone, Web, Xbox, Netduino, etc.22Questions?