About 5,800,000 results
Open links in new tab
  1. Declaration statements - local variables and constants, var, local ...

    Jun 21, 2023 · A declaration statement declares a new local variable, local constant, or local reference variable. To declare a local variable, specify its type and provide its name. You can declare multiple …

  2. C# Variables - W3Schools

    Declaring (Creating) Variables To create a variable, specify the type and assign it a value:

  3. C# Variables: Declare, Access & Use Variables - TutorialsTeacher.com

    In C#, a variable stores a value of the specific data type. It can store a numeric, char, string, or other types of value. You can declare and assign a value to a variable like int x = 5; where int is the data …

  4. C# Variables - GeeksforGeeks

    Jul 11, 2025 · In C#, variables are containers used to store data values during program execution. So basically, a Variable is a placeholder of the information which can be changed at runtime.

  5. C# Variables and (Primitive) Data Types - Programiz

    Variables in C# must be declared before they can be used. This means, the name and type of variable must be known before they can be assigned a value. This is why C# is called a statically-typed …

  6. Variable Declaration and Initialization | C# Tutorial

    Sep 12, 2025 · In C#, variables must be declared with a specific type, and optionally initialized with a value. This article explores how to declare variables, assign values, and update them - all using …

  7. C# - Variables - Online Tutorials Library

    In C#, you declare a variable by specifying its data type and a variable name. Here's the basic syntax to declare a variable: After declaring a variable, you can initialize it with a value. Here's an example of …

  8. 4.4. Variables — Introduction to Programming in C# documentation

    The act of creating a variable is referred to as variable declaration, or simply declaration. Once a variable has been declared, it may be given a value using an assignment statement, which uses = to …

  9. Understanding Variables in C# with Examples | Easy Guide

    Mar 26, 2025 · In C#, variables work the same way! They are like labeled containers that store values, such as numbers, text, or true/false values. For example, if you want to store a person’s age in a …

  10. Variables in C# - DEV Community

    Oct 26, 2025 · When you declare a variable in C#, you're essentially asking the computer to reserve a specific amount of memory space to store a value. The amount of memory reserved depends on the …