Variables in C# question | SoloLearn: Learn to code for FREE!

+1

Variables in C# question

Is it better to declare a variable before using it (assigning a value to it later in the code) or declare the variable and assign it at the same time?

c#

6/1/2020 12:11:00 PM

Star Ahmad

1 Answer

New Answer

+7

I usually declare the variable and assign it at the same time