public void ToFormattedString() { PageLine line = new PageLine(); for (int i = 0; i < PageLine.Size; i++) { line[i] = (byte)(0x30 + i); } Console.WriteLine(line.ToString()); Console.WriteLine(); Console.WriteLine(line.ToString("G")); Console.WriteLine(); Console.WriteLine(line.ToString("H")); Console.WriteLine(); Console.WriteLine(line.ToString("C")); Console.WriteLine(); }
public void ToStringInvalidFormat() { try { PageLine line = new PageLine(); Console.WriteLine(line.ToString("X")); } catch (FormatException ex) { Console.WriteLine(ex.Message); throw ex; } }