1. Select (a) when operating the SQL Server database ).
A) SQL Server. NET Framework data provider;
B) OLE DB. NET Framework data provider;
C) ODBC. NET Framework data provider;
D) Oracle. NET Framework data provider;
2. Among the following options, (c) is the reference type.
A) Enum type
B) struct type
C) string type
D) int type
3. Which of the following statements about the hidden code files in ASP. NET is true? ()
A) the logic of a web form page program 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 #, it will have the ". ascx. cs" extension.
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.
4. Which of the following statements is false? ()
A) abstract classes are supported in C ++ but not in C.
B) In C ++, class members can be declared in header files and class members can be defined in CPP files. in C #, class members are declared and defined at the same place without header files.
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.
5. C # data types are (B)
A) value type and call type;
B) Value Type and reference type;
C) reference type and link type;
D) link type and call type;
6. Which of the following statements is false? (d)
A) the class cannot be inherited multiple times, but the interface can;
B) abstract classes can define members, but interfaces cannot;
C) abstract classes and interfaces cannot be instantiated;
D) A class can have multiple base classes and multiple base interfaces;
7. How to load an XML document in the DOM (B)
A) Save Method
B) Load Method
C) loadxml Method
D) Send Method
8. Which of the following statements about constructors is true? (c)
A) constructors can declare the return type.
B) The constructor cannot be modified using private.
C) The constructor must be the same as the class name.
D. The constructor cannot contain parameters.
9. The following are some enumeration definitions in C #. The incorrect usage is ()
A) Public Enum var1 {Mike = 100, Hike = 102, Jike}
B) Public Enum var1 {Mike = 100, Hike, Jike}
C) Public Enum var1 {Mike =-1, Hike, Jike}
D) Public Enum var1 {Mike, Hike, Jike}
10. int [] [] myarray3 = new int [3] [] {New int [3] {5, 6, 2}, new int [5] {6, 9, 7, 8, 3 }, new int [2] {3, 2 }}; the value of myarray3 [2] [2] is (d ).
A) 9
B) 2
C) 6
D) Cross-border
11. An interface is a reference type. You can declare (A) in the interface, but cannot declare public or private member variables.
A) methods, attributes, indexers, and events;
B) methods, attribute information, and attributes;
C) Indexer and field;
D) Events and fields;
12. In the ASP. NET Framework, server controls are specially designed to work with web forms. There are two types of server controls: ()
A) HTML controls and Web controls
B) HTML controls and XML controls
C) XML controls and Web controls
D) HTML controls and IIS controls
13. In ASP. NET, register a user control on the web forms page and specify the control name as "Mike". The correct registration command is (B)
A) <% @ register tagprefix = "Mike" tagname = "space2" src = "myx. ascx" %>
B) <% @ register tagprefix = "space2" tagname = "Mike" src = "myx. ascx" %>
C) <% @ register tagprefix = "SpaceX" tagname = "space2" src = "Mike" %>
D) None of the above
14. In ADO. net, the following statements about the executenonquery () method and executereader () method of the command object are false: (c ).
A) SQL statements for insert, update, delete, and other operations are mainly executed using the executenonquery () method;
B) executenonquery () method returns the number of rows affected by SQL statement execution.
C) the SQL statement of the select operation can only be executed by the executereader () method;
D) The executereader () method returns a datareder object;
15. The following ASP. NET Statement (B) correctly creates a connection with the SQL Server 2000 database.
A) sqlconnection con1 = new connection ("Data Source = localhost; Integrated Security = sspi; initial catalog = mydb ");
B) sqlconnection con1 = new sqlconnection ("Data Source = localhost; Integrated Security = sspi; initial catalog = mydb ");
C) sqlconnection con1 = new sqlconnection (Data Source = localhost; Integrated Security = sspi; initial catalog = mydb );
D) sqlconnection con1 = new oledbconnection ("Data Source = localhost; Integrated Security = sspi; initial catalog = mydb ");
16. In winform, which of the following statements about the properties and events of the Toolbar Control is false is (d ).
A) The buttons attribute indicates all toolbar buttons of the Toolbar Control.
B) The buttonsize attribute indicates the size of the toolbar buttons on the toolbar control, such as the height and width.
C) The dropdownarrows attribute indicates whether to display the down arrow keys next to the toolbar button (which has a column value that needs to be displayed in the following PULL mode ).
D) The buttonclick event is triggered when you click anywhere on the toolbar.
17. When executing a stored procedure in ADO. net, if you want to set the output parameter, you must set the direction and (d) of the parameter at the same time, and set the parameter size when necessary.
A) size;
B) upper limit;
C) Initial value;
D) type;
18. If formboderstyle of the form is set to none, (B ).
A) The form does not have borders and cannot be adjusted;
B) The form does not have a border but can be adjusted;
C) The form has borders but cannot be adjusted;
D) The form is transparent;
19. If you want to set the form to transparent, (B)
A) set the formboderstyle attribute to none;
B) set the opacity attribute to a value smaller than 100%;
C) set the locked attribute to true;
D) set the enabled attribute to true;
20. Which of the following statements about the indexer in C # is true? (c)
A) The index must have two or more parameters.
B) The indexer parameter type must be integer.
C. The indexer has no name.
D) None of the above
21. Which of the following statements is false? (d ).
A) The form is also a control;
B) The form is also a class;
C) controls are inherited from forms;
D) The parent class of the form is the control class;
22. To perform operations on the registry, you must include (d ).
A) system. componentmodel namespace;
B) system. Collections namespace;
C) system. Threading namespace;
D) Microsoft. Win32 namespace;
23. To create a multi-document application, set the (d) attribute of the form to true.
A) drawgrid;
B) showintaskbar;
C) enabled;
D) ismdicontainer;
24. If treeview1 = new Treeview () is set, treeview1.nodes. Add ("Root Node") returns a value of the (a) type.
A) treenode;
B) int;
C) string;
D) Treeview;
25. Which of the following statements about XML is false is (d ).
A) XML provides a method to describe structured data;
B) XML is a simple, platform-independent and widely used standard;
C) XML documents can carry various types of information;
D) XML is only used to generate structured documents;
26. The following C # code is used to define an interface:
Public interface ifile
{
Int;
Int delfile ()
{
A = 3;
}
Void disfile ();
}
Which of the following statements about the above Code is false? (a, B, d ).
A) errors in the above Code include: variables cannot be defined in the interface, so the int A code line will have an error;
B) errors in the above Code include: interface method delfile is not allowed to be implemented, so specific implementation functions cannot be written;
C) code void disfile (); declares that there is no error and the interface can return no value;
D) code void disfile (); It should be written as void disfile (){};
30. Declare a delegate Public Delegate int mycallback (int x); then the prototype of the callback method generated by the delegate should be (B ).
A) void mycallback (int x );
B) int receive (INT num );
C) string receive (int x );
D) uncertain;
2. Correct question √ wrong question × (2 points for each question, total 20 points)
1. (T) in C #, the packing operation converts the value type to the reference type.
2. Members of the (f) interface cannot have access domain modifiers, but can have other modifiers.
3. (f) in C #, The indexer is used to access the array information in the object.
4. (T) in C #, the interface can be inherited multiple times, but the class cannot.
5. (f) in C #, int [] [] is a two-dimensional array of the int type.
6. (T) exception class objects are system. exception class objects.
7. (T) when the form is minimized and restored to an active form again, the painting event is automatically triggered.
8. (t) Asp. in. net, the verification control is used to verify user input. Users are not allowed to skip this input. The user input value ranges from 0 to 1000. The requiredfieldvalidator and rangevalidator controls are applicable.
9. (f) declares that the delegate actually declares a method.
10. (T) Everything is an object.