在MSDN上,此代码发布在https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/try-catch 我无法理解为什么它会抛出错误:
使用未分配的局部变量'n'.
static void Main()
{
int n;
try
{
// Do not initialize this variable here.
n = 123;
}
catch
{
}
// Error: Use of unassigned local variable 'n'.
Console.Write(n);
}
Run Code Online (Sandbox Code Playgroud) FIFO、LIFO和LC Branch and Bound 有什么区别?