How can I determine if a composite format string is invalid?
Posted
by Tinister
on Stack Overflow
See other posts from Stack Overflow
or by Tinister
Published on 2010-04-16T18:59:53Z
Indexed on
2010/04/16
19:03 UTC
Read the original article
Hit count: 146
Per the documentation, String.Format
will throw a FormatException
if either (A) the format string is invalid or (B) the format string contains an index that cannot be found in the args array.
I want to be able to determine which (if either) of those conditions fail on any arbitrary string and array of arguments.
Is there anything that can do that for me? Thanks!
© Stack Overflow or respective owner