1: Which of the following statements about the code hidden files in ASP. NET is true? C
A. The program logic of the web form page consists of Code. The Code is created to interact with the form. The programming logic is unique in a file that is different from the user interface. This file is called a "code hidden" file. If it is created in C #,
B. The code hidden files on all web forms pages in the project are compiled into. EXE files.
C. The code hidden files of all web forms pages in the project are compiled into the dynamic link library (. dll) file of the project.
D. None of the above are correct.
2: In Object Oriented Programming, how wocould you describe encapsulation?
A. the conversion of one type of object to another.
B. The runtime resolution of method CILS.
C. The exposition of data.
D. The separation of interface and implementation.
3: The running result of the following program is:
Public abstract class
{
Public ()
{
Console. writeline ('A ');
}
Public Virtual void fun ()
{
Console. writeline ("A. Fun ()");
}
}
Public Class B:
{
Public B ()
{
Console. writeline ('B ');
}
Public new void fun ()
{
Console. writeline ("B. Fun ()");
}
Public static void main ()
{
A A = new B ();
A. Fun ();
}
}
A. a B A. Fun ()
B. a B. Fun ()
C. B A. Fun ()
D. B a B. Fun ()
4: What compiler switch creates an XML file from the XML comments in the files in an assembly? B
A./Text
B./doc
C./XML
D./help
5:
The line with syntax errors in the following program code is ().
Int I, Ia [10], IB [10];/* First line */
For (I = 0; I <= 9; I ++)/* 2nd rows */
IA [I] = 0;/* 3rd rows */
IB = IA;/* 4th rows */
A. 1st rows
B. row 2nd
C. 3rd rows
D. Row 4th
6. Which of the following statements is false?
A. abstract classes are supported in C ++ but not in C.
B .C ++ can declare a class member in the header file and define the class member in the CPP file. in C #, there is no header file and the class member is declared and defined at the same place.
C. in C #, you can use the new modifier to explicitly hide the members inherited from the base class.
D. in C #, override must be added before the virtual functions of the base class to be redefined in the derived class.
7: declare a delegate Public Delegate int mycallback (int x); then the prototype of the callback method generated by this delegate should be B
A. Void mycallback (int x)
B .int receive (INT num)
C. String receive (int x)
D. uncertain
8: The values of C and D after the following C program code snippets are B
Int A = 1, B = 2;
Int C, D;
C = (A & B) &;
D = (A & B) &;
A.0, 0
B .0, 1
C.1, 0
D.1, 1
9: If treeview1 = new Treeview () and treenode node = new treenode ("Root Node") are set, treeview1.nodes. Add (node) returns a value of the (B) type.
A. treenode
B .int
C. String
D. Treeview
10: If a and B are int variables, the value of B is
A = 1;
B = 10;
Do
{
B-=;
A ++;
} While (B -- <0 );
A.9
B .-2
C.-1
D.8
11: 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 );
}
A. I = 2001, O = 2000, j = 2000
B. I = 2001, O = 2001, j = 2001
C. I = 2000, O = 2001, j = 2000
D. I = 2001, O = 2000, j = 2001
12: In the following options, the program that does not constitute an endless loop is
A.int I = 100 while (1) {I = I % 100 + 1; if (I> 100) break ;}
B. (;;);
C.int K = 1000; do {++ K;} while (k> = 10000 );
D.int S = 36; while (s); -- S;
13: Which of the following statements is inaccurate in the software life cycle?
A. The software life cycle is divided into three stages: planning, development, and operation.
B. analyze the problems and requirements in the planning stage
C. write code and software testing at the end of development
D. mainly perform software maintenance during the running stage.
14: The Waterfall Model of the software life cycle divides the software project into three stages and eight sub-stages. Which of the following is the normal development sequence?
A. Planning, Development, and operation phases
B. design, development, and coding phases
C. Design, coding, and maintenance
D. Planning, coding, and testing
15: 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 ();
}
}
The output result of this program is:
A. baseclass
B. bassclass class1
C. class1
D. class1 bassclass
16: int [] [] myarray3 = new int [3] [] {New int [3] {, 2}, new int [5, 3}, new int [2] {3, 2}; the value of myarray3 [2] [2] is: d
A.9
B .2
C.6
D. Cross-border
Short answer
17: What is application pool?
Application pool is a new concept of Microsoft: application pool is a configuration that links one or more applications to one or more worker processes. Because applications in the application pool are separated from other applications by working process boundaries, applications in an application pool will not be affected by problems caused by applications in other application pools.
18: lists several methods for passing values between ASP. NET pages.
(1) querystring cannot pass a long string
(2) The session cannot be used too much. It depends on cookies and is easy to lose.
(3) Cookie depends on client settings, which is unreliable
(4) server. Transfer can only customize one page to accept customized pages.
(5) The Hidden control/view state can only be passed to the current page unless otherwise specified
(6) static member. thread security cannot be guaranteed
(7) The cache is not suitable for variables that are discarded once.
(8) global application with high overhead
(9) The database is global and overhead is higher unless it is tracked by logs.
(10) XML or other files are globally fixed with higher overhead unless log tracking is performed.
(11) XMLHTTP or hidden IFRAME/Frame
(12) Context. User. Identity
19: What is PostBack?
20: Are there three session state providers in ASP. NET 1.1 and their advantages and disadvantages?
ASP. NET supports three session state storage methods.
[1] The session state of In-process and ASP is compatible, and the session value is stored in the memory of the working process of Asp.net.
ASP. NET: aspnet_wp.exeor w3wp.exe (Win 2003)
Web. config
<Configuration>
<Sessionstate mode = "inproc" timeout = "20"/>
</Configuration>
[2] State Server
The session will be stored in the memory of a service named aspnet_state.exe on State server. This service is an independent process,
It can run on different machines than IIS to prevent session loss after the Worker Process crashes.
First, start service: Net start aspstate.
Set the mode, server, and port in Web. config.
<Configuration>
<Sessionstate mode = "StateServer"
Cookieless = "false"
Timeout = "20 ″
Server = "127.0.0.1 ″
Port = "42424"/>
</Configuration>
[3] SQL Server
Session will be stored in SQL Server and used to support server farm
First, install the corresponding database. The SQL script exists in Microsoft. NET \ framework \ [version] \
Osql-s [server name]-U [user]-P [Password] <installsqlstate. SQL
Or execute
Microsoft. NET \ framework \ [version] \ aspnet_regsql-S. \ sql2k5-e-ssadd-sstype P
Set the mode, server, and port in Web. config.
<Configuration>
<Sessionstate mode = "sqlserver"
Cookieless = "false"
Timeout = "20 ″
Sqlconnectionstring = "data source = mysqlserver; user id = <…>; Password = <…>" />
</Configuration>
21: when you run a component in ASP. NET, which process does it run on Windows XP, Windows 2000, and Windows 2003 respectively?
XP: aspnet_wp.exe
Windows 2000: aspnet_wp.exe
Windows 2003: w3wp.exe
22: What is viewstate? Is it encoded? Encrypted? Who will use viewstate?
By default, the value stored in _ viewstate is only base64 encoded and not encrypted. If viewstate contains some confidential information, you need to increase its security, in this way, viewstate can be encrypted. You can set the value of viewstateencryptionmode to determine whether to encrypt it. The value is "Auto", "always", and "never". The default value is "Auto ". "Always" indicates encryption, "never" indicates that encryption is not performed, and "Auto" indicates that encryption is performed after the registerrequiresviewstateencryption method is called.
23: How does a generation of spam collectors in. Net CLR manage the object lifecycle? What is the end of uncertainty?
Controls the reference count of objects. That is, it records how many variables are using this object. When the count is 0, it indicates that the object is useless and the recycle condition is entered.
The garbage collector is idle in the system, memory is insufficient, and the Code shows that the recycle call automatically determines when to start the recycle, so the specific time for ending an object cannot be determined.
24: Why is catch (exception) not recommended )?
Transfer http://www.cnblogs.com/hongweiqu/archive/2010/03/05/1679473.html