2行を比較しようとすると、次のようなエラーが表示されます。
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
私のコードは次のとおりです。
if (i != (dt.Rows.Count - 1))
{
if (Convert.ToDouble(dt.Rows[i][1].ToString()) ==
Convert.ToDouble(dt.Rows[i + 1][1].ToString())) // this is the wrong line
{
for (int j = 0; j < dt.Rows.Count - i; j++)
{
if (Convert.ToDouble(dt.Rows[i][1].ToString()) ==
Convert.ToDouble(dt.Rows[i + j][1].ToString()))
ToDoubleをToInt32に変更しようとしましたが、機能しません。
誰か教えてもらえますか、このエラーメッセージはどういう意味ですか?
どうもありがとう!!!