摘要
美国微软开发的VB.NET2005可视化程序设计语言中,有一个DivideByZeroException类,它是当程序中有整数除法运算而除数为零时发生的异常,这种异常通过"Catch e As DivideByZeroException"语句来捕捉,捕捉到后根据相应的容错处理语句继续执行。但在教学实践和实际编程中发现,在整数除法运算中发生除数为零的情况时,DivideByZeroException类异常并不能发生,这反映了微软开发的VB.NET2005程序设计语言中的一个漏洞。对这个问题进行了分析,并提出了弥补该漏洞的解决方案。
There is a DivideByZeroException class in VB.NET 2005–a Visual Programming Language developed by American Mi-crosoft.It's an exception To happen when an integer is divided by zero.This kind exception is tracked by"Catch e As DivideByZeroException"instruction and continue to run the program based on the relevant fault-tolerant processing instruction.However,it has been found that in teaching practice and programming,when performing such an operation of division,DivideByZeroException class exception can not happened,which shows that there exists a bug in VB.NET2005.The paper analyzes the problem and offers possible solutions.
出处
《微计算机信息》
2010年第12期224-225,223,共3页
Control & Automation