单项选择题
您正在开发.NET Framework 2.0 应用程序上 Certkiller-WS554。您编写的应用程序的行号在下面的代码是只供参考:
01: Public Function ProcCount() As Integer
02: Dim envPerm As EnvironmentPermission = _
03: New EnvironmentPermission( _
04: EnvironmentPermissionAccess.Read, _
05: "NUMBER_OF_PROCESSORS")
06: 'Add code segment here
07: Return Environment.ProcessorCount
08: End Function 在代码中的 ProcCount
方法将用于返回运行代码的计算机上的处理器数和方法的实现是完全透明的方法的调用方。你确保 ProcCount 方法已被授予访问环境变量的权限的代码的调用方可能没有权限访问的变量。为了能够成功调用 ProcCount 方法需要中的其他程序集的类。在行 06 至重写安全检查,虽然您确保任何您编写的代码不会影响已有您的代码的权限,您必须添加代码。 您应添加哪些代码段?()
A.envPerm.PermitOnly()
B.envPerm.Demand()
C.encPerm.Deny()
D.envPerm.Assert()
相关考题
-
单项选择题
You are creating a class that performs complex financial calculations. The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate.You write serialized representations of the class.You need to write a code segment that updates the currRate variable with the current interest rate when an instance of the class is deserialized. Which code segment should you use?()
A.A
B.B
C.C
D.D -
单项选择题
为应用程序开发人员上班 Certkiller.com,Certkiller.com 使用 Visual Studio.NET 2005 作为其应用程序开发平台。 您正在开发.NET Framework 2.0 图形分析中的应用。 您将要保存图形对象从应用程序就是集合的 x 和 y 点,每个由使用单精度浮点数。 您需要保留的磁盘空间使用量减至最少保存对象。 你应该做什么?()
A.使用TextWriter类。
B.使用StreamWriter类。
C.使用StringWriter类。
D.使用BinaryWriter类。 -
单项选择题
为应用程序开发人员上班 Certkiller.com,Certkiller.com 使用 Visual Studio.NET 2005 作为其应用程序开发平台。 您正在开发.NET Framework 2.0 银行业函数检索的注销的支票图像,并将它们显示在 Windows 窗体应用程序,繁忙的工作中。目前,您可以从 Microsoft SQL server 作为一系列字节读入图像的一种方法来访问。 您需要选择一个类,使您得以到 Windows 窗体应用程序从 SQL 服务器传输图像,虽然您的解决方案可以减少需要的临时缓冲区和文件 。 你应该做什么?()
A.使用MemoryStream类。
B.使用NetworkStream类。
C.使用FileStream类。
D.使用BufferedStream类。
