我正在尝试查找三位演员的 Facebook 点赞数都不应该少于其他两位演员的一半的行。
但是我收到一个错误KeyError: 'actor_1_facebook_likes'。你能帮我解决这个问题吗。
答案 0 :(得分:1)
我想向您展示一种更简洁、更高效的方式来编写代码。创建条件并使用 private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
String str = sender.ToString();
int X = Convert.ToInt32(str.Substring(str.Length - 1));
FontStyle fontstylee = ((FontStyle)X);
label1.Font = new Font(label1.Font, fontstylee);
}
删除满足这些条件的行。我希望这会有所帮助:
~