试题详情
- 单项选择题您要写下面的名为 CustomException的自定义异常类public class CustomException : ApplicationException { public static int COR_E_ARGUMENT = unchecked((int)0x80070057); public CustomException(string msg) : base(msg) { HResult = COR_E_ARGUMENT; }}您需要编写一段代码,这段代码要使用ustomException 类,并且要迅速返回控制权给COM 调用方法。 您应该使用哪个代码?()
A、return Marshal.GetExceptionForHR(CustomException.COR_E_ARGUMENT);
B、return CustomException.COR_E_ARGUMENT;
C、Marshal.ThrowExceptionForHR(CustomException.COR_E_ARGUMENT);
D、throw new CustomException(“Argument is out of bounds”);
- D
关注下方微信公众号,在线模考后查看
热门试题
- You create&ens
- 你创建了一个包含一些UI元素Web窗体。
- Your organization h
- Yournetworkconsistso
- A Windows Communicat
- Youarethenetworkadmi
- You are a
- 为应用程序开发人员上班 Certkil
- 您在第一个磁盘分割中全新安装
- Your network&e
- Certkiller具有与Active&
- You develop a Web co
- 您有一台运行Windows
- You use Microsoft .
- You have
- Your Exchange&
- You are creating a
- You work
- Your network&e
- Your network&e