c#每日一题(十四)
You have added a new Web page to your Web application to be used by all your suppliers.You need to create an XmlDocument object for use in this page.
Which of the following procedures will create an XmlDocument object in the newly added Web page?
(Each choice describes a complete solution.)(Select all choices that are correct.)
A.Create the object with the line Dim xmlDoc As System.Xml.XmlDocument = CreateObject("XmlDocument").
B.Create the object with the line Dim xmlDoc As System.Xml.XmlDocument = CreateObject("System.Xml.XmlDocument").
C.Add the line Imports Xml to the top of file.
Create the object with the line Dim xmlDoc as XmlDocument = New XmlDocument().
D.Create the object with the line Dim xmlDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument().
E.Create the object with the line Dim xmlDoc as Object = New XmlDocument().
F.Add the line Imports System.Xml to the top of the file.
Create the object with the line Dim xmlDoc as XmlDocument =New XmlDocument().
问题点数:20、回复次数:15Top
1 楼wangasp(小虾一个)回复于 2005-04-19 17:37:43 得分 1
还是不要用英文了吧
多出点题目,让大家都学习一下!Top
2 楼VBDN( PowerBASIC.CN )回复于 2005-04-20 08:45:58 得分 0
这可是MCAD70-315认证的原题啊!没有人想考么?Top
3 楼631799(杭州工人)回复于 2005-04-21 14:35:53 得分 1
upTop
4 楼bitsbird(一瓢 在路上...)回复于 2005-04-21 14:47:34 得分 5
D,FTop
5 楼lyshrine(贝克)回复于 2005-04-21 16:17:27 得分 1
顶!Top
6 楼kuzhuxuan()回复于 2005-04-21 16:23:03 得分 1
CTop
7 楼kuzhuxuan()回复于 2005-04-21 16:30:16 得分 1
发错了 FTop
8 楼conan19771130(残疾人程序员,学习第2门外语)回复于 2005-04-21 16:36:35 得分 1
有点意思FTop
9 楼tammy2net(love.net)回复于 2005-04-21 16:42:07 得分 1
...............Top
10 楼grf601006617(宫崎锋)回复于 2005-04-21 16:55:47 得分 1
我英语还很差~看不懂~Top
11 楼rib06(诸刃突袭·掌上的明珠)回复于 2005-04-21 18:24:03 得分 7
呵呵 又开始啦 还是我来翻译吧~~
假设你向自己的一个Web应用中添加了一个新的Web页,而你所有的供应商都会用到这个Web应用。你需要在这个新页面中创建一个XmlDocument对象。请问下面的选项中哪个可以正确的在新页中把这个XmlDocument对象创建起来?
(每个选项都是一个完整的解决方案,选择所有你认为正确的选项)
A.这样创建对象:Dim xmlDoc As System.Xml.XmlDocument = CreateObject("XmlDocument").
B.这样创建对象:Dim xmlDoc As System.Xml.XmlDocument = CreateObject("System.Xml.XmlDocument").
C.在文件最上面增加一行 Imports Xml
然后这样创建: Dim xmlDoc as XmlDocument = New XmlDocument().
D.这样创建对象:Dim xmlDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument().
E.这样创建对象:Dim xmlDoc as Object = New XmlDocument().
F.在文件最上面增加一行 Imports System.Xml
然后再这样创建: Dim xmlDoc as XmlDocument =New XmlDocument().
这次翻的比较烂,大家凑合看吧,应该没有强奸题意~~
我怎么觉得B D F都行啊Top
12 楼VBDN( PowerBASIC.CN )回复于 2005-04-22 11:49:30 得分 0
参考答案:DFTop
13 楼VBDN( PowerBASIC.CN )回复于 2005-04-22 11:59:52 得分 0
为什么B是错误的呢?请看下边原题注释:
You can create an XML document by creating an instance of the System.Xml.Xmldocument class.You can explicitly include the System.Xml namespace in the object creation code,or you can import the namespace by using the imports keyword at the top of the page.You must use the fully qualified namespace,System.Xml,with the imports statement.
The createObject function is used to create instances of COM objects.Top
14 楼winstarr(星仁)回复于 2005-04-22 12:05:10 得分 0
在这里 ,CreateObject 不能用?Top
15 楼rib06(诸刃突袭·掌上的明珠)回复于 2005-04-22 12:53:46 得分 0
哦,这样啊。把最关键的最后一句翻译一下吧:
createObject函数是用来创建COM对象实例的Top




