CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  .NET技术 >  C#

c#每日一题(十四)

楼主VBDN( PowerBASIC.CN )2005-04-19 09:25:11 在 .NET技术 / 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

相关问题

  • c#每日一题(一)
  • c#每日一题(十一)
  • c#每日一题(二)
  • c#每日一题(三)
  • c#每日一题(四)
  • c#每日一题(六)
  • c#每日一题(七)
  • c#每日一题(八)
  • c#每日一题(九)
  • c#每日一题(十)

关键词

  • 选项
  • top
  • xml
  • xmldocument
  • dim xmldoc
  • 创建
  • 题
  • 对象
  • createobject
  • create

得分解答快速导航

  • 帖主:VBDN
  • wangasp
  • 631799
  • bitsbird
  • lyshrine
  • kuzhuxuan
  • kuzhuxuan
  • conan19771130
  • tammy2net
  • grf601006617
  • rib06

相关链接

  • CSDN .NET频道
  • .NET类图书
  • C#类图书
  • .NET类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo