Distributed Systems Tutorial 1 - Getting Started with Visual C#.NET.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Computer and Programming
Numeric literals and named constants. Numeric literals Numeric literal: Example: A numeric literal is a constant value that appears in a Java program.
Introduction to Java Lab CS110A – Lab Section 004 Instructor: Duo Wei.
C# Programming: From Problem Analysis to Program Design1 2 Your First C# Program C# Programming: From Problem Analysis to Program Design 2 nd Edition.
IEG 3080 Tutorial 1 Wilson Ip. Outline Lecture reviews: Some basics of Software Engineering principle Some basics of OOP How to use Visual Studio.NET.
Adding a Syllabus Link. Let’s add the syllabus to the homepage. Return to the homepage Click “Add File” To get to the homepage, click the Course Content.
Introduction to Computing and Programming
C# Programming: From Problem Analysis to Program Design1 2 Your First C# Program.
GTECH 731 Lab Session 2 Lab 1 Review, Lab 2 Intro 9/6/10 Lab 1 Review Lab 2 Overview.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
Shorthand operators.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
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.
Introduction to .NET Framework
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
C# B 1 CSC 298 Writing a C# application. C# B 2 A first C# application // Display Hello, world on the screen public class HelloWorld { public static void.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College Lecture 2: Working with Visual.
Distributed Systems (236351) Tutorial 1 - Getting Started with Visual Studio C#.NET.
The string data type String. String (in general) A string is a sequence of characters enclosed between the double quotes "..." Example: Each character.
Computer Programming 1.  Editor Console Application Notepad Notepad++ Edit plus etc.  Compiler & Interpreter Microsoft.NET Framework  Microsoft visual.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Programming Concept Chapter I Introduction to Java Programming.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Computer Science I How to Configure Visual Studio.NET 2003 for C++ Colin Goble.
NUNIT - Testing your Application. NUnit Tool – Used for Test driven development Lets create a sample banking class named account which supports operations.
The scope of local variables. Murphy's Law The famous Murphy's Law says: Anything that can possibly go wrong, does. (Wikipedia page on Murphy's Law:
Getting Started with C# August 29, NET Concepts Language Independence Language Integration  your C# program can use a class written in VB Program.
Boolean expressions, part 2: Logical operators. Previously discussed Recall that there are 2 types of operators that return a boolean result (true or.
Comments in Java. When you create a New Project in NetBeans, you'll notice that some text is greyed out, with lots of slashes and asterisks:
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
1 Introduction to C# Programming Console applications No visual components Only text output Two types MS-DOS prompt - Used in Windows 95/98/ME Command.
Mixing integer and floating point numbers in an arithmetic operation.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
 Instructor: Dr. Jason Nichols –  Office Hours: – 9:30-10:30 M/W/F or by appointment – Business Building.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
The assignment expressions. The assignment operator in an assignment statement We have seen the assignment statement: Effect: var = expr; Stores the value.
Compiling and running Java programs with BlueJ. Successfully compiled files program files in BlueJ You can tell from the shade of a program icon in BlueJ.
1 Class 1 Lecture Topic Concepts, Definitions and Examples.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Boolean expressions, part 1: Compare operators. Compare operators Compare operators compare 2 numerical values and return a Boolean (logical) value A.
Module 1 Introducing C# and the.NET Framework. Module Overview Introduction to the.NET Framework 4 Creating Projects Within Visual Studio 2010 Writing.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Learning Plan 6 Java Programming Intro to Object Oriented Programming.
Building C# Applications
C# Programming: From Problem Analysis to Program Design
The eclipse IDE IDE = “Integrated Development Environment”
C# — Console Application
using System; namespace Demo01 { class Program
USING ECLIPSE TO CREATE HELLO WORLD
Java Basics Packages.
Introduction to C# AKEEL AHMED.
OOP’S Concepts in C#.Net
Getting Started with Programming
C# Programming: From Problem Analysis to Program Design
Functions Used to write code only once Can use parameters.
Understanding the Visual IDE
How to Run a Java Program
1. Open Visual Studio 2008.
ms vısual studıo 2008-Introductıon TUTORIAL
Lab 1 Introduction to C++.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Creating the First Program
How to organize and document your classes
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Developing Java Applications with NetBeans
Developing Java Applications with NetBeans
IS 135 Business Programming
Presentation transcript:

Distributed Systems Tutorial 1 - Getting Started with Visual C#.NET

2 Course Info  Home page:  Three Mandatory Programming Assignments  Requirements:  Working knowledge of Java / C#  Basic knowledge of OOP concepts  Basic knowledge of network concepts (sockets, protocols)  No textbook, look at the home page for manuals, tutorials and additional resources

3 Hello World application  Development in Visual Studio is organized around solutions, which contain one or more projects. For this tutorial, we will create a solution with a single C# project.  Creating a New Project In the Visual Studio.NET environment, select File | New | Project from the menu.

4 Hello World application cont.  Select Visual C# Projects on the left and then Console Application on the right..

5  Specify the name of your project and enter the location in which to create the project. The project directory will be created automatically by Visual Studio  Click OK and you're on your way!

6 Class1.cs  using System;  namespace HelloWorld  {  class Class1  {  static void Main(string[] args)  {  Console.WriteLine("Hello C# World!");  }

7 Namespaces  Namespaces are used to define scope in C# applications  Multiple source code files can contribute to the same namespace  The using directive permits you to reference classes in the namespace without using a fully qualified name  class Class1  { static void Main(string[] args) { System.Console.WriteLine ("Hello, C#.NET World!"); }  }

8 Namespaces cont.  using System;  class Class1  { static void Main(string[] args) { Console.WriteLine ("Hello, C#.NET World!"); }  }  When the compiler parses theConsole.WriteLine method, it will determine that the method is undefined.  It will search through the namespaces specified with the using directives and will find the method in the System namespace and will compile the code.

9 Namespaces cont.  Note that using directive applies to namespaces and not to classes  In the example: System is the namespace Console is the class WriteLine is a static method belonging to Console  Therefore the following code would be invalid:

10  using System.Console; // ERROR: Can’t use a using directive with a class  class Class1  { static void Main(string[] args) { WriteLine ("Hello, C#.NET World!"); }  }  But its possible: using output = System.Console; //alias output.WriteLine(“Hello, C#.NET World”);

11 Skeleton  using  namespace  class  { public static void Main() { // TODO: Add code to start application here }  }  Notice that the angle brackets denote where you need to supply information.