Creating and Running Your First C# Program Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training

Slides:



Advertisements
Similar presentations
Windows Basic and Dynamic Disk Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator Marian Marinov CEO of 1H Ltd.
Advertisements

Hybrid or Native?! Doncho Minkov Telerik Software Academy Senior Technical Trainer
Make swiftly iOS development Telerik Academy Telerik Academy Plus.
Amazon S 3, App Engine Blobstore, Google Cloud Storage, Azure Blobs Svetlin Nakov Telerik Software Academy academy.telerik.com.
RPN and Shunting-yard algorithm Ivaylo Kenov Telerik Software Academy academy.telerik.com Technical Assistant
Shortest paths in edge-weighted digraph Krasin Georgiev Technical University of Sofia g.krasin at gmail com Assistant Professor.
Telerik Software Academy Telerik School Academy.
Asynchronous Programming with C# and WinRT
Unleash the Power of JavaScript Tooling Telerik Software Academy End-to-end JavaScript Applications.
Character sequences, C-strings and the C++ String class, Working with Strings Learning & Development Team Telerik Software Academy.
Hybrid or Native?! Doncho Minkov Telerik Software Academy Senior Technical Trainer
Done already for your convenience! Telerik School Academy Unity 2D Game Development.
Processing Sequences of Elements Telerik School Academy C# Fundamentals – Part 1.
C# Fundamentals – Part I
Telerik Software Academy Telerik School Academy Creating E/R Diagrams with SQL Server.
The Business Plan and the Business Model Margarita Antonova Volunteer Telerik Academy academy.telerik.com Business System Analyst Telerik Corporation.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training About the Course.
What are ADTs, STL Intro, vector, list, queue, stack Learning & Development Team Telerik Software Academy.
Making JavaScript code by template! Learning & Development Team Telerik Software Academy.
Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training Who, What, Why?
Svetlin Nakov Telerik Software Academy Manager Technical Training
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Processing Matrices and Multidimensional Tables Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Learning & Development Telerik Software Academy.
Reading and Writing Text Files Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Telerik Software Academy ASP.NET Web Forms.
Classical OOP in JavaScript Classes and stuff Telerik Software Academy
Using Selenium for Mobile Web Testing Powered by KendoUI Telerik QA Academy Atanas Georgiev Senior QA Engineer KendoUI Team.
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
NoSQL Concepts, Redis, MongoDB, CouchDB Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
New features: classes, generators, iterators, etc. Telerik Academy Plus JavaScript.Next.
Creating E/R Diagrams with SQL Server Management Studio and MySQL Workbench Svetlin Nakov Telerik Software Academy Manager Technical.
Introduction to Programming
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Private/Public fields, Module, Revealing Module Learning & Development Team Telerik Software Academy.
Building Data-Driven ASP.NET Web Forms Apps Telerik Software Academy ASP.NET Web Forms.
Course Introduction Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
Nikolay Kostov Telerik Software Academy Senior Software Developer and Trainer
Telerik Software Academy End-to-end JavaScript Applications.
General and reusable solutions to common problems in software design Vasil Dininski Telerik Software Academy academy.telerik.com Intern at Telerik Academy.
Planning and Tracking Software Quality Yordan Dimitrov Telerik Corporation Team Leader, Team Pulse, Team Leader, Team Pulse, Telerik Corporation,
What you need to know Ivaylo Kenov Telerik Corporation Telerik Academy Student.
Data binding concepts, Bindings in WinJS George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer itgeorge.net.
Pavel Kolev Telerik Software Academy Senior.Net Developer and Trainer
Objects, Properties, Primitive and Reference Types Learning & Development Team Telerik Software Academy.
When and How to Refactor? Refactoring Patterns Alexander Vakrilov Telerik Corporation Senior Developer and Team Leader.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Doing the Canvas the "easy way"! Learning & Development Telerik Software Academy.
.NET Cloud Development Made Easy George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer 1.
Course Overview Doncho Minkov Telerik Software Academy Technical Trainer
Correctly Formatting the Source Code Nikolay Kostov Telerik Software Academy academy.telerik.com Senior Software Developer and Technical Trainer
Data Types, Primitive Types in C++, Variables – Declaration, Initialization, Scope Telerik Software Academy academy.telerik.com Learning and Development.
The past, the present, the future Learning & Development Team Telerik Software Academy.
Learn to Design Error Steady Code Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Processing Sequences of Elements Telerik Software Academy C# Fundamentals – Part 2.
Telerik JavaScript Framework Telerik Software Academy Hybrid Mobile Applications.
Building Rock-Solid Software Nikolay Kostov Telerik Software Academy academy.telerik.com Senior Software Developer and Technical Trainer
Telerik Software Academy Databases.
Things start to get serious Telerik Software Academy JavaScript OOP.
Learning & Development Mobile apps for iPhone & iPad.
Processing Matrices and Multidimensional Tables Telerik Software Academy C# Fundamentals – Part 2.
Nikolay Kostov Telerik Software Academy academy.telerik.com Team Lead, Senior Developer and Trainer
Functions and Function Expressions Closures, Function Scope, Nested Functions Telerik Software Academy
Implementing Control Logic in C# Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical trainer
Mocking tools for easier unit testing Telerik Software Academy High Quality Code.
What why and how? Telerik School Academy Unity 2D Game Development.
Windows Security Model Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator
Presentation transcript:

Creating and Running Your First C# Program Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training

1. What is Computer Programming? 2. Your First C# Program 3. What is.NET Framework? 4. What is Visual Studio? 5. What is MSDN Library? 2

Computer programming: creating a sequence of instructions to enable the computer to do something Definition by Google 4

 Define a task/problem  Plan your solution  Find suitable algorithm to solve it  Find suitable data structures to use  Write code  Fix program error (bugs)  Make your customer happy = Specification = Design = Implementation = Testing & Debugging = Deployment 5

Sample C# program: using System; class HelloCSharp { static void Main() static void Main() { Console.WriteLine("Hello, C#"); Console.WriteLine("Hello, C#"); }} 7

using System; class HelloCSharp { static void Main() static void Main() { Console.WriteLine("Hello, C#"); Console.WriteLine("Hello, C#"); }} Include the standard namespace " System " Define a class called " HelloCSharp " Define the Main() method – the program entry point Print a text on the console by calling the method " WriteLine " of the class " Console " 8

using System; class HelloCSharp { static void Main() static void Main() { Console.WriteLine("Hello, C#"); Console.WriteLine("Hello, C#"); }} The { symbol should be alone on a new line. The block after the { symbol should be indented by a TAB. The } symbol should be under the corresponding {. Class names should use PascalCase and start with a CAPITAL letter. 9

using usingSystem ; class HelloCSharp { class HelloCSharp { static static void Main( ) { Console. WriteLine ("Hello, C#" ) ;Console. WriteLine ( "Hello again" WriteLine ( "Hello again" ) ;}} ) ;}} Such formatting makes the source code unreadable. 10

 Programming language  A syntax that allow to give instructions to the computer  C# features:  New cutting edge language  Extremely powerful  Easy to learn  Easy to read and understand  Object-oriented 11

 Knowledge of a programming language  C#  Task to solve  Development environment, compilers, SDK  Visual Studio,.NET Framework SDK  Set of useful standard classes  Microsoft.NET Framework FCL  Help documentation  MSDN Library 12

Live Demo

 Environment for execution of.NET programs  Powerful library of classes  Programming model  Common execution engine for many programming languages  C#  Visual Basic.NET  Managed C++ ... and many others 15

Operating System (OS) Common Language Runtime (CLR) Base Class Library (BCL) ADO.NET, LINQ and XML (Data Tier) WCF and WWF (Communication and Workflow Tier) ASP.NET Web Forms, MVC, AJAX Mobile Internet Toolkit WindowsFormsWPFSilverlight C#C++VB.NETJ#F#JScriptPerl Delphi…  Building blocks of.NET Framework FCL CLR 16

 Common Language Runtime (CLR)  Managed execution environment  Executes.NET applications  Controls the execution process  Automatic memory management (garbage collection)  Programming languages integration  Multiple versions support for assemblies  Integrated type safety and security CLR 17

 Framework Class Library (FCL)  Provides basic functionality to developers:  Console applications  WPF and Silverlight rich-media applications  Windows Forms GUI applications  Web applications (dynamic Web sites)  Web services, communication and workflow  Server & desktop applications  Applications for mobile devices 18

 Visual Studio – Integrated Development Environment (IDE)  Development tool that helps us to:  Write code  Design user interface  Compile code  Execute / test / debug applications  Browse the help  Manage project's files 20

 Single tool for:  Writing code in many languages (C#, VB, …)  Using different technologies (Web, WPF, …)  For different platforms (.NET CF, Silverlight, …)  Full integration of most development activities (coding, compiling, testing, debugging, deployment, version control,...)  Very easy to use! 21

22

Compiling, Running and Debugging C# Programs

1. File  New  Project Choose C# console application 3. Choose project directory and name 24

4. Visual Studio creates some source code for you Namespace not required Class name should be changed Some imports are not required 25

 The process of compiling includes:  Syntactic checks  Type safety checks  Translation of the source code to lower level language (MSIL)  Creating of executable files (assemblies)  You can start compilation by  Using Build->Build Solution/Project  Pressing [F6] or [Shift+Ctrl+B] 26

 The process of running application includes:  Compiling (if project not compiled)  Starting the application  You can run application by:  Using Debug->Start menu  By pressing [F5] or [Ctrl+F5] * NOTE: Not all types of projects are able to be started! 27

 The process of debugging application includes:  Spotting an error  Finding the lines of code that cause the error  Fixing the code  Testing to check if the error is gone and no errors are introduced  Iterative and continuous process 28

 Visual Studio has built-in debugger  It provides:  Breakpoints  Ability to trace the code execution  Ability to inspect variables at runtime 29

Compiling, Running and Debugging C# Programs Live Demo

Creating a Solution Without Projects

 A Visual Studio blank solution  Solution with no projects in it  Projects to be added later  What is the point?  Not making a project just to give proper name  And not working in this project

33

Live Demo

 Complete documentation of all classes and their functionality  With descriptions of all methods, properties, events, etc.  With code examples  Related articles  Library of samples  Use local copy or the Web version at

37

 Offline version  Use the table of contents  Use the alphabetical index  Search for phrase or keyword  Filter by technology  Browse your favorite articles  Online version  Use the built-in search 38

Browsing and Searching Documentation Live Demo

форум програмиране, форум уеб дизайн курсове и уроци по програмиране, уеб дизайн – безплатно програмиране за деца – безплатни курсове и уроци безплатен SEO курс - оптимизация за търсачки уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop уроци по програмиране и уеб дизайн за ученици ASP.NET MVC курс – HTML, SQL, C#,.NET, ASP.NET MVC безплатен курс "Разработка на софтуер в cloud среда" BG Coder - онлайн състезателна система - online judge курсове и уроци по програмиране, книги – безплатно от Наков безплатен курс "Качествен програмен код" алго академия – състезателно програмиране, състезания ASP.NET курс - уеб програмиране, бази данни, C#,.NET, ASP.NET курсове и уроци по програмиране – Телерик академия курс мобилни приложения с iPhone, Android, WP7, PhoneGap free C# book, безплатна книга C#, книга Java, книга C# Николай Костов - блог за програмиране

1. Familiarize yourself with:  Microsoft Visual Studio  Microsoft Developer Network (MSDN) Library Documentation  Find information about Console.WriteLine() method. 2. Create, compile and run a “Hello C#” console application. 3. Modify the application to print your name. 4. Write a program to print the numbers 1, 101 and

5. Install at home: 1.Microsoft.NET Framework 2.Microsoft Visual Studio (or Visual C# Express) 3.Microsoft Developer Network (MSDN) 6. Create console application that prints your first and last name. 7. Create a console application that prints the current date and time. 8. Create a console application that calculates and prints the square of the number

9. Write a program that prints the first 10 members of the sequence: 2, -3, 4, -5, 6, -7, Provide a short list with information about the most popular programming languages. How do they differ from C#? 11. Describe the difference between C# and.NET Framework. 12. * Write a program to read your age from the console and print how old you will be after 10 years. *NOTE: If you have any difficulties, search in Google. 43

 Fundamentals of C# Programming Course  csharpfundamentals.telerik.com csharpfundamentals.telerik.com  Telerik Software Academy  academy.telerik.com academy.telerik.com  Telerik Facebook  facebook.com/TelerikAcademy facebook.com/TelerikAcademy  Telerik Software Academy Forums  forums.academy.telerik.com forums.academy.telerik.com