好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

新蛋科技.net工程方面的笔试题.docx

11页
  • 卖家[上传人]:1518****093
  • 文档编号:249285398
  • 上传时间:2022-02-04
  • 文档格式:DOCX
  • 文档大小:30.18KB
  • / 11 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 新蛋科技.net工程方面的笔试题新蛋科技.net工程方面的笔试题  1、 DataSet和DataReader的区分和相同点,分别适合用于什么样的状况?  答:  2、 有基类如下:  public class parent  {  public parent()  {  Console.Write(;Parent;);  }  }  请写出一个子类Son,要求子类的构造函数实现如下的功能:(1)输出儿子的NAME、SEX、AGE、以及Parent,(2)要求在Son的构造函数里不能有任何的吩咐语句出现  public class parent  {  public parent()  {  Console.Write(;Parent;);  }  }  public class Son:parent  { static string name=null;  static int sex=0;  static int age=0;  public parent(string name,int sex,int age):base()  {  name=name;  sex=sex;  age=age;  display();  }  publci void display()  {  Console.WriteLine(;name=;+name);  Console.WriteLine(;sex=;+sex);  Console.WriteLine(;age=;+age);  }  }  3、 请例举出三种以上进行页面重定向的方式(包括服务端和客户端)。

        答: 第一种: Response.Redirect,  其次种: Server.Transfer  第三种:  function redirect(url) {  document.theForm.action = url;  document.theForm.submit();  }  第四种: StringBuilder sb=new StringBuilder();  sb.Append(; ;);  Response.Write(sb.ToString());  4、 写出禁用ViewState的语句  答: Control(详细的某个控件).EnableViewState=false;  5、 请谈一谈.NET的code-behind模式和code_clude模式的区分,和各自的优点及缺点  6、 写出下列七个程序段的输出结果:  (1)  interface InFace  {  void fun();  }  class MyParent:InFace  {  public void fun()  {  Console.WriteLine(;Parent;);  }  }  class MySon:MyParent  {  public void fun()  {  Console.WriteLine(;Son;);  }  }  public class MyTest  {  public static void Main(string[] args)  {  InFace inf=new MySon();  inf.fun();  }  }  结果:Parent  (2)  interface InFace  {  void fun();  }  class MyParent:InFace  {  public new void fun()  {  Console.WriteLine(;Parent;);  }  }  class MySon:MyParent  {  public void fun()  {  Console.WriteLine(;Son;);  }  }  public class MyTest  {  public static void Main(string[] args)  {  InFace inf=new MySon();  inf.fun();  Console.Read();  }  }  结果:Parent  (3)  interface InFace  {  void fun();  }  class MyParent:InFace  {  public new void fun()  {  Console.WriteLine(;Parent;);  }  }  class MySon:MyParent  {  public new void fun()  {  Console.WriteLine(;Son;);  }  }  public class MyTest  {  public static void Main(string[] args)  {  InFace inf=new MySon();  inf.fun();  Console.Read();  }  }  结果:Parent  (4)  interface InFace  {  void fun();  }  class MyParent:InFace  {  public void fun()  {  Console.WriteLine(;Parent;);  }  }  class MySon:MyParent  {  public override void fun()  {  Console.WriteLine(;Son;);  }  }  public class MyTest  {  public static void Main(string[] args)  {  InFace inf=new MySon();  inf.fun();  Console.Read();  }  }  结果:语法错误: 无法重写继承成员;ConsoleApplication6.MyParent.fun();,因为它未标记为 virtual、abstract 或 override本文来源:网络收集与整理,如有侵权,请联系作者删除,谢谢!第11页 共11页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页第 11 页 共 11 页。

      点击阅读更多内容
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.