Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の回避策はばかげているようですが、エラーを防ぎます。これを行うより良い方法はありますか?
try { myNumber = Convert.ToInt32(InputRow.Substring(288, 9)); } catch (FormatException e) { }
int.TryParseは良い選択かもしれません
int val = 0; if(int.TryParse(InputRow.Substring(288, 9), out val)) // insert val into db