Introduction to the C# Programming Language for the VB Programmer.

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

Windows Programming 1 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
Introduction to the C# Programming Language for the VB Programmer.
C# Programming: From Problem Analysis to Program Design1 2 Your First C# Program C# Programming: From Problem Analysis to Program Design 2 nd Edition.
Introduction to.NET Microsoft announced in June 2000 A new software –development model that allows applications created in disparate programming languages.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
CIS205 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
An Introduction to C# and the .NET Framework
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
Introduction 01_intro.ppt
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
A First Program Using C#
Neal Stublen Overview of.NET Windows Applications Microsoft Windows OS / Intel Platform Windows Application File SystemNetworkDisplay.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Introduction to .Net Framework
High thoughts must have high language. Aristophanes
Module 1: Introduction to C# Module 2: Variables and Data Types
.NET Overview. 2 Objectives Introduce.NET –overview –languages –libraries –development and execution model Examine simple C# program.
Session 1 - Introduction and Data Access Layer
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Microsoft Visual Basic 2005: Reloaded Second Edition
Appendix D: Microsoft.NET Framework Overview. Overview.NET Framework Architecture.NET Namespaces.
Introduction to .NET Framework
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Neal Stublen Class Objectives  Develop an understanding of the.NET Framework  Gain proficiency using Visual Studio  Begin learning.
CSCI 3327 Visual Basic Chapter 6: Methods: A Deeper Look UTPA – Fall 2011.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
Programming in C#. I. Introduction C# (or C-Sharp) is a programming language. C# is used to write software that runs on the.NET Framework. Although C#
Week 1: THE C# LANGUAGE Chapter 1: Variables and Expressions ➤ Included in Visual Studio.NET ➤ What the.NET Framework is and what it contains ➤ How.NET.
Introduction to .NET Framework
ISYS 812 Business Software Development David Chao.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 17 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Introduction to VB.Net. What is.NET? A brand of Microsoft technologies A platform for creating distributed Web applications A combination of new and updated.
Getting Started with C# August 29, NET Concepts Language Independence Language Integration  your C# program can use a class written in VB Program.
1 C# A brief overview by Jack Senechal and Bryan Powell.
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
Module 1: Overview of the Microsoft .NET Framework
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Object Oriented Software Development 4. C# data types, objects and references.
C# and.NET. .NET Architecture  Compiling and running code that targets.NET  Advantages of Microsoft Intermediate Language (MSIL)  Value and Reference.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Module 1 Introducing C# and the.NET Framework. Module Overview Introduction to the.NET Framework 4 Creating Projects Within Visual Studio 2010 Writing.
Introduction to C# Programming with Microsoft.NET AY
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
D OTNET ONLINE TRAINING. DOTNET Online Training Course Content : Introduction to.Net Online Training NET FUNDAMENTALS Why Dot Net? The Dot Net initiative.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
Foundations of .Net Programming with C#
Introduction to Visual Basic 2008 Programming
C# and the .NET Framework
Introduction to .NET Framework Ch2 – Deitel’s Book
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Lecturer: Mukhtar Mohamed Ali “Hakaale”
Lecture 1 Making a C# GUI Program
Introduction to .NET By : Mr. V. D. Panchal Content :
DOT NET ARCHITECTURE (OR) DOT NET FRAME WORK ARCHITECTURE
Presentation transcript:

Introduction to the C# Programming Language for the VB Programmer

Slide 2 Lecture Overview Compilation and execution of programs Some key terms Introduce the C# programming language for the VB developer Mention some important features of the Visual Studio.NET environment Pass along some editing tips and tricks

Slide 3 Program Compilation The.NET languages are compiled languages Code is compiled from the source language (VB, C#, etc..) into machine independent assembly language (MSIL) MSIL is converted to executable through JITing (Just in time)

Slide 4 Program Execution (1).NET applications use the Common Language Runtime (CLR) and are executed as Managed Code Libraries are stored in framework classes Your code and framework classes are executed by the CLR

Slide 5 Program Execution (2)

Slide 6 Fundamentals of.NET and C# (1) Unified type system (Common Type System) Unified run-time engine with memory management built-in (Common Language Runtime) (Garbage collection) It’s a type safe language Static types are enforced at compile time rather than at run time

Slide 7 Fundamentals of.NET and C# (2) Classes encapsulate functionality and have methods, properties (object orientation) Classes implement interfaces See Figure 1.1

Slide 8 C# Development and Runtime Model

Slide 9 Assemblies and Namespaces Assemblies are physical – Namespaces are logical An assembly may contain one or more namespaces The.NET Framework is just a bunch of assemblies Namespaces are organized into a hierarchy Namespaces are connected together with a dot (.) System namespace contains components developed by the.NET team Microsoft namespace contains components developed by Microsoft but outside of the.NET development team We references these assemblies and namespaces from our applications

Slide 10 Common Assemblies System.dll defines the primary data types System.Data.dll defines the components that make up ADO.NET System.Drawing.dll contains the components used to draw various shapes to an output device Forms and printers are output devices System.Windows.Forms.dll contains components to implement desktop forms System.XML.dll used to process XML documents

Slide 11 Common Namespaces System namespace contains fundamental classes System.Data namespace contains classes supplying data access capabilities ADO.NET System.Drawing provides access to the Graphical Device Interface allowing shapes to be drawn to forms and printers System.IO provides access to files System.Windows.Forms supplies the capabilities to create forms and control instances on those forms

Slide 12 Adding an Assembly Reference

Slide 13 Importing and Using Namespaces By default, you must fully qualify class and method names System.IO.StreamReader for example In VB, the Imports statement allows unqualified references Imports System.IO In C#, it’s the using statement using System.IO;

Slide 14 Project Structure Everything is the same as VB Solution file, project file, program files Namespace references Modules have a file suffix of.cs instead of.vb Application startup works a bit differently VB uses a form or Sub Main C# has a “special” procedure named Main()

Slide 15 Solution Explorer Shows all relevant project files

Slide 16 And now for the all Famous Hello World Create a new C# Console project

Slide 17 Program.cs using statements replace Imports statement

Slide 18 Program.cs namespace forms the outer block { } marks a block

Slide 19 Program.cs namespace blocks contain classes, which contain properties and methods

Slide 20 Program.cs The Main() method is called the entry point It’s where program execution begins Must be declared as static Method can return either a void or an int

Slide 21 Program.cs Methods (Main) contain local variable declarations and executable statements