Пример #1
0
 //
 // Enable use of ThrowHelper from TryParse() routines without introducing dozens of non-code-coveraged "value= default; bytesConsumed = 0; return false" boilerplate.
 //
 public static bool TryParseThrowFormatException <T>(out T value, out int bytesConsumed)
 {
     value         = default;
     bytesConsumed = 0;
     ThrowHelper.ThrowFormatException_BadFormatSpecifier();
     return(false);
 }
Пример #2
0
 //
 // Enable use of ThrowHelper from TryFormat() routines without introducing dozens of non-code-coveraged "bytesWritten = 0; return false" boilerplate.
 //
 public static bool TryFormatThrowFormatException(out int bytesWritten)
 {
     bytesWritten = 0;
     ThrowHelper.ThrowFormatException_BadFormatSpecifier();
     return(false);
 }