为什么在为 Windows Phone 开发应用程序时字符串长度属性在 C# 中不起作用。这是我的代码;
private void showName_Click(object sender, EventArgs e)
{
string name = "UserName";
MessageBox.Show(name.Length);
}
错误
'System.Windows.Controls.Page' does not contain a definition for 'Length'