Introduction to C# and Development Environment PDF

Document Details

Pamantasan ng Lungsod ng San Pablo

2021

Alison James G. Reyes

Tags

C# Programming C# Development Object-Oriented Programming Programming Languages

Summary

This document provides an introduction to C# and its development environment. It covers the basics of the language, examples, its history, along with the .NET framework and its features. The presentation was prepared by Alison James G. Reyes for PAMANTASAN NG LUNGSOD NG SAN PABLO in 2021.

Full Transcript

Introduction to C# and Development Environment Prepared By: Alison James G. Reyes Introduction to C# C# (pronounced as "C-sharp") is a modern, object-oriented programming language developed by Microsoft. It is designed for a wide range of applications, including desktop...

Introduction to C# and Development Environment Prepared By: Alison James G. Reyes Introduction to C# C# (pronounced as "C-sharp") is a modern, object-oriented programming language developed by Microsoft. It is designed for a wide range of applications, including desktop software, web applications, games, and more. Examples Voting System.... E-Commerce Web App.... Online Ticket Booking System.... Employee/Student Management system.... Tic-Tac-Toe game.... Music Player.... Weather App. History of C# C# was first introduced as part of the.NET Framework in July 2000s. It was created by Anders Hejlsberg, Scott Wiltamuth and Peter Golde. Anders Hejlsberg (/ˈhaɪlzbɜːrɡ/, born 2 December 1960)is a Danish software engineer who co-designed several programming languages and development tools. He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Microsoft as the lead architect of C#[ and core developer on TypeScript. Net Framework NET is a software framework that is designed and developed by Microsoft. The first version of the.Net framework was 1.0 which came in the year 2002. In easy words, it is a virtual machine for compiling and executing programs written in different languages like C#, VB.Net, etc. Key Features of C# Strong Typing: C# enforces strict type checking, reducing the likelihood of runtime errors. Purpose: Type safety, Compile-Time Errors, Improved Code Readability, Code Maintenance,Security. Garbage Collection: Automatic memory management simplifies memory handling. Purpose: Error Handling, Testing Documentation Object-Oriented: C# is object-oriented, allowing developers to model real-world entities in their code. Purpose: The purpose of using object-oriented programming (OOP) in C# (or any other programming language) is to design and structure your code in a way that models real-world entities, relationships, and behaviors effectively. EX: ENCAPSULATION ABASTRACTION , INHERITANCE AND POLYMORPHISM Example of OOP Key Features Platform Independence: C# code can be compiled to run on different platforms, thanks to the.NET framework's cross- platform capabilities. Why Learn C#? Learning C# is valuable for several reasons: High demand for C# developers in the job market. Versatility for developing various types of applications. A solid foundation for understanding programming concepts. HELLO PLSP CODE =)(Using VS CODE) Using Online Compiler What is the use of this code? using System; : This line includes the System namespace, which contains essential classes and methods for working with the console, among other things. using System; class Program: This line defines a class named "Program." In C#, the entry point of a console application is typically within a class class Program called "Program.“ static void Main() :This line defines the entry point of the program, which is the { Main method. It is marked as static so that it can be called without an instance static void Main() of the class. It returns void, indicating that it doesn't return any value. { { }: These curly braces enclose the body of the Main method, which contains the code that Console.WriteLine ("Hello PLSP"); will be executed when the program runs. } Console.WriteLine("Hello PLSP"); : This line is the actual code that does something. It uses the Console.WriteLine method to print the text "Hello PLSP" to the console. } The WriteLine method adds a newline character after the text, so each call to WriteLine prints a new line. How ?????? CHECK THE DOTNET VERSION IF INSTALL COMMAND PROMPT ADD WORKSPACE TERMINAL DOTNET NEW CONSOLE RESTORE SUCCEEDED END

Use Quizgecko on...
Browser
Browser