There is no equivalent in C#.
In C, C++ and C# you must declare your variables before attempting to assign them.
You should however be aware of variable scope -
Variable and Method Scope in Microsoft .NET[
^] - there are no differences between scope in VB.NET and C# (AFAIK).
[EDIT] - Option Explicit in VB isn't what provides the default values - those are defined by the framework -
Default Values Table (C# Reference)[
^]
If you want to prevent default values being used then get into the habit of always explicitly assigning a value to the variable. There are tools available that will prompt you if you have not done this (I don't know of any free ones though)
[EDIT #2]
I downloaded an express version of Visual Studio so I could check this without the tools or settings I normally use...
Consider this code snippet ..
int c;
private void button1_Click(object sender, EventArgs e)
{
int a;
int b = 10;
Console.WriteLine((a + b).ToString());
Console.WriteLine((c + b).ToString());
}
This gave me one error and one warning ...
Error Use of unassigned local variable 'a'
Warning 'WindowsFormsApplication1.Form1.c' is never assigned to, and will always have its default value 0
So for local variables you will be told off by VS for not initialising but for 'global' or class level variables you will only be warned by default.
You can force VS to convert those warnings to errors by going into YourProject, Properties, Build