public static int Problem(StructWithIndex a) { bool k = a.Value == 1; a = default; if (k) { return(1); } return(a.Index); }
static int Problem(StructWithIndex a, int[] d) { var a1 = a; try { for (a1.Index = 0; a1.Index < 10; a1.Index = a1.Index + 1) { a1 = GetStructWithIndex(); JitUse(d[a1.Index]); } } catch (IndexOutOfRangeException) { return(z); } return(-1); }