N道c#面试题(经典奉献).docVIP

  • 2
  • 0
  • 约 15页
  • 2017-08-22 发布于河南
  • 举报
1、C#中 property 与 attribute抽像类的区别,他们各有什么用处,这种机制的好处在哪里? property和attribute汉语都称之为属性。不过property是指类向外提供的数据区域。而attribute则是描述对象在编译时或运行时属性的。这两者是有本质区别的。 2 .列举ASP.NET 页面之间传递值的几种方式。 答. 1).使用QueryString, 如?id=1; response. Redirect() 2).使用Session变量 3).使用Server.Transfer 3. 一列数的规则如下: 1、1、2、3、5、8、13、21、34 求第30位数是多少, 用递归算法实现。 答:public class MainClass { public static void Main() { Console.WriteLine(Foo(30)); } public static int Foo(int i) { if (i = 0) return 0; else if(i 0 i = 2) return 1; else return Foo(i -1) + Foo(i - 2);

文档评论(0)

1亿VIP精品文档

相关文档