Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Assign a Value to a Variable

From Groundhog Learning
Revision as of 16:06, 21 October 2025 by Groundhog (talk | contribs) (Updated via bot)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Assigning a value to a variable means putting data into it so the program can use or change it later.



Assign a Value to a Variable in C#

💻 csharp

int score = 0;  // Declare integer variable score with value 0.
score = 10;     // Assign (store) the value 10. Score has the value 10.

Related Concepts

References