Question 36. (µ¥Ñ¡)
ÉùÃ÷Ò»¸öίÍÐpublic delegate int myCallBack(int x); ÔòÓøÃίÍвúÉúµÄ»Øµ÷·½·¨µÄÔÐÍÓ¦¸ÃÊÇ
1. void myCallBack(int x)
2. int receive(int num)
3. string receive(int x)
4. ²»È·¶¨µÄ
Question 37. (µ¥Ñ¡)
¹ØÓÚASP.NETÖеĴúÂëÒþ²ØÎļþµÄÃèÊöÕýÈ·µÄÊÇ
1. Web´°ÌåÒ³µÄ³ÌÐòµÄÂß¼ÓÉ´úÂë×é³É£¬ÕâЩ´úÂëµÄ´´½¨ÓÃÓÚÓë´°Ìå½»»¥¡£±à³ÌÂ߼ΨһÓëÓû§½çÃæ²»Í¬µÄÎļþÖС£¸ÃÎļþ³Æ×÷Ϊ¡°´úÂëÒþ²Ø¡±Îļþ£¬Èç¹ûÓÃC££´´½¨£¬¸ÃÎļþ
2. ÏîÄ¿ÖÐËùÓÐWeb´°ÌåÒ³µÄ´úÂëÒþ²ØÎļþ¶¼±»±àÒë³É.EXEÎļþ
3. ÏîÄ¿ÖÐËùÓеÄWeb´°ÌåÒ³µÄ´úÂëÒþ²ØÎļþ¶¼±»±àÒë³ÉÏîÄ¿¶¯Ì¬Á´½Ó¿â£¨.dll£©Îļþ
4. ÒÔÉ϶¼²»ÕýÈ·
Question 38. (µ¥Ñ¡)
What compiler switch creates an xml file from the xml comments in the files in an assembly
1. /text
2. /doc
3. /xml
4. /help
Question 39. (µ¥Ñ¡)
ÏÂÃæµÄ´úÂëʵÏÖÁËÉè¼ÆÄ£Ê½ÖеÄʲôģʽ
public class A {
private A instance;
private A() {
}
public static A Instance {
get
{
if ( A == null )
A = new A();
return instance;
}
}
}
1. Factory
2. Abstract Factory
3. Singleton
4. Builder
Question 40. (µ¥Ñ¡)
class Class1
{
public static int Count = 0;
static Class1()
{
Count++;
}
public Class1()
{
Count++;
}
}
Class1 o1 = new Class1();
Class1 o2 = new Class1();
ÇëÎÊ£¬Class1.CountµÄÖµÊǶàÉÙ£¿( )
1. 1
2. 2
3. 3
4. 4
Question 41. (µ¥Ñ¡)
abstract class BaseClass
{
public virtual void MethodA()
{
Console.WriteLine(¡°BaseClass¡±);
}
public virtual void MethodB()
{
}
}
class Class1: BaseClass
{
public void MethodA()
{
Console.WriteLine(¡°Class1¡å);
}
public override void MethodB()
{
}
}
class Class2: Class1
{
new public void MethodB()
{
}
}
class MainClass
{
public static void Main(string[] args)
{
Class2 o = new Class2();
o.MethodA();
}
}
ÇëÎÊ£¬´Ë³ÌÐòÊä³ö½á¹ûÊÇ:
1. BaseClass
2. BassClass Class1
3. Class1
4. Class1 BassClass
Question 42. (µ¥Ñ¡)
public static void Main(string[] args)
{
int i = 2000;
object o = i;
i = 2001;
int j =(int) o;
Console.WriteLine(¡°i={0},o={1}, j={2}¡±,i,o,j);
}
1. i=2001,o=2000,j=2000
2. i=2001,o=2001,,j=2001
3. i=2000,o=2001,,j=2000
4. i=2001,o=2000,j=2001
Question 43. (¶àÑ¡)
ÄúÒª´´½¨ASP.NETÓ¦ÓóÌÐòÓÃÓÚÔËÐÐAllWin¹«Ë¾ÄÚ²¿µÄWebÕ¾µã£¬Õâ¸öÓ¦ÓóÌÐò°üº¬ÁË50¸öÒ³Ãæ¡£ÄúÏëÒªÅäÖÃÕâ¸öÓ¦ÓóÌÐòÒԱ㵱·¢ÉúÒ»¸öHTTP´úÂë´íÎóʱËü¿ÉÒÔÏÔʾһ¸ö×Ô¶¨ÒåµÄ´íÎóÒ³Ãæ¸øÓû§¡£ÄúÏëÒª»¨×îСµÄ´ú¼ÛÍê³ÉÕâЩĿ±ê£¬ÄúÓ¦¸ÃÔõô×ö£¿(¶àÑ¡)
1. ÔÚÕâ¸öÓ¦ÓóÌÐòµÄGlobal.asaxÎļþÖд´½¨Ò»¸öApplication_Error¹ý³ÌÈ¥´¦ÀíASP.NET´úÂë´íÎó¡£
2. ÔÚÕâ¸öÓ¦ÓóÌÐòµÄWeb.configÎļþÖд´½¨Ò»¸öapplicationError½ÚÈ¥´¦ÀíASP.NET´úÂë´íÎó¡£
3. ÔÚÕâ¸öÓ¦ÓóÌÐòµÄGlobal.asaxÎļþÖд´½¨Ò»¸öCustomErrorsʼþÈ¥´¦ÀíHTTP´íÎó¡£
4. ÔÚÕâ¸öÓ¦ÓóÌÐòµÄWeb.configÎļþÖд´½¨Ò»¸öCustomErrors½ÚÈ¥´¦ÀíHTTP´íÎó¡£
Question 44. (µ¥Ñ¡)
ÈçϳÌÐòµÄÔËÐнá¹ûÊÇ£º
public abstract class A
{
public A()
{
Console.WriteLine(¡®A¡¯);
}
public virtual void Fun()
{
Console.WriteLine(¡°A.Fun()¡±);
}
}
public class B: A
{
public B()
{
Console.WriteLine(¡®B¡¯);
}
public new void Fun()
{
Console.WriteLine(¡°B.Fun()¡±);
}
public static void Main()
{
A a = new B();
a.Fun();
}
}
1. A B A.Fun()
2. A B B.Fun()
3. B A A.Fun()
4. B A B.Fun()
Question 45. (µ¥Ñ¡)
Which of these string definitions will prevent escaping on backslashes in C# *
1. string s = #¡±n Test string¡±;
2. string s = ¡°¡¯n Test string¡±;
3. string s = @¡±n Test string¡±;
4. string s = ¡°n Test string¡±;
Question 46. (µ¥Ñ¡)
Which of the following operations can you NOT perform on an ADO.NET DataSet
1. A DataSet can be synchronised with a RecordSet.
2. A DataSet can be synchronised with the database.
3. A DataSet can be converted to XML.
4. You can infer the schema from a DataSet
Question 47. (µ¥Ñ¡)
In Object Oriented Programming, how would you describe encapsulation
1. The conversion of one type of object to another.
2. The runtime resolution of method calls.
3. The exposition of data.
4. The separation of interface and implementation.
Question 48. (µ¥Ñ¡)
How does assembly versioning in .NET prevent DLL Hell
1. The runtime checks to see that only one version of an assembly is on the machine at any one time.
2. .NET allows assemblies to specify the name AND the version of any assemblies they need to run.
3. The c