Objective1. Write your first program in C#.2. Work with variables, primitive data types & operators.3. Use implicit & explicit type casting.4. Use varkeyword.5. Work with arrays.6. Define decision structure.7. Define decision operators.8. Work with loops.9. Use jump statements.10. Use & define methods.
Program Structure & Language FundamentalsWrite first program in C#1. using: statement helps to import namespace in the program. These namespaceshave types that we can use to develop applications.2. namespaceFirstProject: C# strictly follows object-oriented design. Therefore,when we created an empty console project, it creates a namespace with a projectname. Inside namespace we write types for our project.3. classProgram: C# creates a default class inside namespace called “Program”.Inside classes we write methods, fields, properties, and events that we can reusein the project.4. Main: C# program must contain a main method. It is where execution of theprogram begins.
Subscribe to view the full document.
Program Structure & Language FundamentalsVariables & Data TypesData is everywhere. Our job as a developer is to manipulate data and produce required results. Data have numerous types (for example, text, audio, and video, etc.). Each type of data can hold a different size inmemory. The same concept applies while writing an application in C#. We have variables to store data anddata types to describe what type/size of data can be stored in a variable.SyntaxDate_Type Variable_Name = Value;Code SnippetInitialize an integer variable “age”int age = 10;