[Mono-list] Cairo bug?

Mike Welham mwelham at gmail.com
Mon Oct 22 09:10:09 EDT 2007

Hi Brandon,

> I am doing some work with Cairo (gbrainy) and have run across what seems
> like it would be a bug. I get a System.FormatException crash when
> attempting to draw a certain puzzle. Here is the code:
> //gr.ShowText (String.Format ("  {1}", number_b));

The braced number in the format string is a zero-based index into the
argument list that follows.

You're getting the exception because you're specifying {1}, where you
only have one argument ({1}, indicates the 2nd argument after the
format string, {2} would indicate the 3rd).


gr.ShowText (String.Format ("  {0}", number_b));
gr.ShowText (String.Format ("  {0}", number_c));

It should work better



More information about the Mono-list mailing list