题目内容:
窗体如图l所示。要求程序运行时,在文本框Textl中输入一个姓氏,单击“删除”按钮(名称为com.mandl),则可删除列表框Listl中所有该姓氏的项目。若编写以下程序来实现此功能. 


在调试时发现.,如输入“陈”,可以正确删除所有姓“陈”的项目,但输入“刘”,则只删除了“刘邦、。刘备”2项,结果如图2所示。这说明程序不能适应所有情况,需要修改。正确的修改方案是把ForK=0T0Iist.ListCount一1改为( )。 A.Fork=List1.ListCount-1To0Step-1
B.Fork=0ToList1.ListCount
C.Fork=1ToList1.ListCount-1
D.Fork=1ToList1.ListCount
参考答案:
答案解析: