C#C
C#14mo ago
cheeze2000

Compiler warnings about unused variables

I have a simple program
var a = 40;
var b = a;
var c = 20;

Console.WriteLine(a);

On my vscode, only c is underlined with this error: The variable 'c' is assigned but its value is never used

Why is b not underlined? I mean it's dimmed but why isn't this a compiler warning as well?
image.png
Was this page helpful?