Answer the question
In order to leave comments, you need to log in
Is it possible to reinitialize variables in C#?
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
for (int a = 0; a < 3;a++)
{
Console.WriteLine(a);
}
int a = 3;
}
}
}
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
for (int a = 0; a < 3;a++)
{
Console.WriteLine(a);
}
a = 3;
}
}
}
Answer the question
In order to leave comments, you need to log in
{
var k = 0;
{
var k = 5;
}
}
{
{
var k = 5;
}
var k = 0;
}
for (int a = 0; a < 3; a++)
{
Console.WriteLine(a);
}
{
int a = 3;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question