Why does this assert throw a format exception when comparing structures?
I’ve got it. And yes, it’s a bug. The problem is that there are two levels of string.Format going on here. The first level of formatting is something like: string template = string.Format(“Expected: {0}; Actual: {1}; Message: {2}”, expected, actual, message); Then we use string.Format with the parameters you’ve supplied: string finalMessage = string.Format(template, parameters); … Read more