1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// CS0165: Use of unassigned local variable `res' // Line: 23 class A { public B b; } class B { public void Foo (int arg) { } } class X { public static void Main () { A a = null; int res; a?.b.Foo(res = 3); System.Console.WriteLine (res); } }