1 (1) object-oriented languages include _ inheritance _, _ encapsulation _, and _ polymorphism.
(2) The _ ienumerable interface or the _ getenumerator method type must be implemented for objects that can be accessed through foreach traversal. Where is the ternary operator in 1. C __? :__
2. When integer a is assigned to an object, integer A will be _ boxed ___?
3. Are there _ 3 _ accessible forms for class members?
4. Public static const int A = 1; is this Code incorrect? What is it? Const members are all static, so we should remove static
5. Float F =-123.567f;
Int I = (INT) F;
The value of I is _-123 ____?
6. The operator statement is used and only = is declared. Is there any error? Want to modify equale and gethash () at the same time ()? If "=" is reloaded, it must be reloaded "! ="
7. The keyword of the delegate statement is ___ delegate ___?
8. What are the characteristics of classes modified with sealed? Cannot be inherited
9. All Custom User Controls in Asp.net must inherit from _ system. Web. UI. usercontrol _______?
10. In. net, all serializable classes are marked as _ [serializable] ___?
11. In. Net hosting code, we don't have to worry about memory vulnerabilities because of _ GC __?
12. Are there any errors in the following code? _ Abstract override cannot be modified together ______
Using system;
Class
{
Public Virtual void F (){
Console. writeline ("a.f ");
}
}
Abstract class B:
{
Public abstract override void F ();
}
13. when class t only declares the constructor of a private instance, a new class is derived from T outside t's program text, _ No _ (yes or no) directly creates any instance of T.
14. Is there any error in the following code? Case (): no default;
Switch (I ){
Case ():
Casezero ();
Break;
Case 1:
Caseone ();
Break;
Case 2:
Dufault;
Casetwo ();
Break;
}
15. Can system. Web. UI. Page be inherited in. Net? Yes
Abstract: This article is. the second article in the net interview series. This series of articles is for all online. net interview questions, including C # interview questions, VB.net interview questions, and Asp.net interview questions. It is a series of articles worth reading for job seekers who participate in. Net interviews. This article mainly lists some. Net-based choice questions.
Keywords:. Net interview questions C # interview questions
Address: http://www.teecool.com/post/2007101401.html
Body of content:
Select:
(1) which of the following statements is true? B C
A. The interface can contain virtual methods. B. A class can implement multiple interfaces. C. The interface cannot be instantiated. D. The interface can contain implemented methods.
(2) read records from the database. You may use the following methods: B c d.
A. executenonquery B. executescalar C. Fill D. executereader
2. For a class that implements the idisposable interface, which of the following tasks can be executed for tasks defined by applications related to the release or reset of unmanaged resources? (Multiple options) (ABC)
A. Close B. Dispose C. Finalize
D. Using e. Quit
3. Which of the following statements about ref and out are true? (Multiple choice) (ACD)
A. When using the ref parameter, the parameter passed to the ref parameter must be initialized first.
B. When the out parameter is used, the parameter passed to the out parameter must be initialized first.
C. If the ref parameter is used, the parameter must be passed to the method as the ref parameter explicitly.
D. When the out parameter is used, the parameter must be passed to the method as the out parameter explicitly.
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? (c)
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 include ()
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 (d)
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, Nike = 102, Jike}
B) Public Enum var1 {Mike = 100, Nike, Jike}
C) Public Enum var1 {Mike =-1, Nike, Jike}
D) Public Enum var1 {Mike, Nike, 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
Abstract: This article is. net Interview Questions series third, this series of articles is all online. net interview questions, including C # interview questions, VB.net interview questions, and Asp.net interview questions. It is a series of articles worth reading for job seekers who participate in. Net interviews. This article mainly lists some. Net-based choice questions.
Keywords:. Net interview questions C # interview questions
Address: http://www.teecool.com/post/2007071402.html
Body of content:
Multiple choice questions
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) indexers and fields; 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 (d)
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 (B) of the parameter at the same time. If necessary, you must set the parameter size.
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 a border 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? (B/C)
A) The indexer parameter must be two or more 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? (C/D ).
A) The form is also a control; B) the form is also a class; c) the control is inherited from the form; d) the form's parent class is a 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 () 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;
1. the packing and unpacking operations occur in: (c)
A. between classes and objects B. between objects
C. Between the reference type and the Value Type D. Between the reference type and the reference type
2. If the user class wants to support the foreach statement, the interface to be implemented is: ()
A. ienumerableb. ienumerator
C. icollectiond. icollectdata
3. What does. NET Framework use to interact with COM components? (C)
A. Side by sideb. Web Service
C. interopd. pinvoke
4. Which of the following technologies does. Net rely on to solve the DLL hell problem of com? ()
A. Side by sideb. InterOP
C. pinvoked. COM +
5. Is the packing and unpacking operations reciprocal? (B)
A. Yes B. No
6. Which of the following is an array that can be extended? (D)
A. array B. String []
C. String [N] D. arraylist
7. Which of the following classes must be used for custom exception classes? ()
A. Exception B. customexception
C. applicationexception D. baseexception
Abstract: This article mainly lists the basic knowledge questions for writing C #. net, including the idisposable interface and cross-language interoperability.