【发布时间】:2013-07-24 13:57:47
【问题描述】:
如何在下面的 C# 代码中用 double 替换字符串以计算“距离”(而不是时间)?距离最初为 0.00。尝试通过 Windows Phone 中的 Sqlite 发布值。
private string time = string.Empty;
public string Time
{
get { return time; }
set { if (SetProperty(ref time, value)) IsDirty = true; }
}
// 需要将值放在下面的行中。
internal CustomerViewModel(int id, double pace, string time, double distance )
{
this.id = id;
this.pace = pace;
this.time = time;
this.distance = distance;
this.isDirty = false;
}
【问题讨论】:
-
我在您显示的代码中既没有看到
double也没有看到distance。您可能想改进您的问题。 -
您是否粘贴了错误的代码?
-
您的编辑并没有使其更清晰。
-
请阅读Writing the perfect question,按照建议重试。
标签: c# .net windows-phone-7 xaml windows-phone-8