Admin Name
Dashboard
Categorey
Sub Categorey
Artilces
Users
Settings
Logout
Welcome to the Admin Panel
Create Post
Select Categorey
- Select -
coding
Select Sub Categorey
Title Name :
Defination :
Variables are used to store data in memory for use in a C# program. C# is a strongly typed language, so every variable must have a data type. Common data types include int, double, string, char, bool, etc.
Code :
int age = 25; string fullName = "Alice Smith"; bool isStudent = true; float height = 5.9f; char grade = 'A'; Console.WriteLine("Name: " + fullName); Console.WriteLine("Age: " + age); Console.WriteLine("Student: " + isStudent); Console.WriteLine("Height: " + height + "ft"); Console.WriteLine("Grade: " + grade);
Code Part 2 :
const double PI = 3.14159; Console.WriteLine("Value of PI is: " + PI);
Upload Image 1
Upload Image 2
Summary
Understanding variables and data types is fundamental in any programming language. This section teaches how to store, access, and manage different types of data in C#.
YouTube Link
Seo Title
Meta Keywords
Meta Description
Introduction to C#
Edit
Variables and Data Types in C#
Edit
Operators in C#
Edit
Control Statements in C# – if, else, switch, and loops Explained
Edit
Loops in C# – for, while, do while, and foreach
Edit
Jump Statements in C# – break, continue, return Explained with Examples
Edit
Conditional Statements in C# if, else if, else, switch Explained with Examples
Edit
Loops in C# – For, While, and Do While with Examples
Edit
Hrjejd
Edit