In c#, string.format, are the arguments always computed? The below code throws index out of bound exception - does that mean that the args are computed before the result of ternary operation?
using System;
public class Program
{
public static void Main()
{
int[] a = {0, 1};
int i = -1;
var errstr = string.Format(i < 0 ? "Wrong Index" : "value - {0}", a[i]);
}
}