首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

初学者有关问题

2012-01-05 
菜鸟问题?private void textBoxAge_KeyPress(object sender, KeyPressEventArgs e){if ((e.KeyChar 48 |

菜鸟问题?
private void textBoxAge_KeyPress(object sender, KeyPressEventArgs e)
  {
  if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8)
  e.Handled = true; // 这句什么意思?
  }

[解决办法]
Handled是事件处理属性,这里是代表把事件处理设置成处理过!看一下c#的帮助里面写得蛮详细的!

热点排行