我正在尝试使用windows窗体从文件中访问excel数据,以输入经纬度信息。然而,当我调试它时,它抛出了“输入字符串没有正确的格式”错误。我使用了以下代码:
namespace Excel_Access
{
public partial class Form1 : Form
{
string myDouble2;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object se
我已经尝试了4个多小时了,我一点也不是专家,我绝对需要帮助。你知道哪里出问题了吗?
// Declare variables
int inches = 0;
double centimetres = 0;
string input;
//Ask for input
Console.Write("Enter Number of centimetres to be converted: ");
input = Console.ReadLine();
//Convert string to int
cent
我的c.ShareWhite是一个字符串,但我不能使用Double.Parse将其转换为双精度 double a = Double.Parse(c.ShareWhite.ToString()); 错误: nhandled exception. System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Double.Par