1. Please talk about. netClass and Structure?
A:Structures and ClassesIt has a general syntax, but the structure is limited by more than the class. The structure cannot declare that there is a default constructor. The replicas of the structure are created and destroyed by the compiler. Therefore, the default constructor and destructor are not required.
Function. The structure is a value type, so changes made to the structure variables will not affect their original values, while the class is a reference type, changing the value of its variables will change its original value. The declarative structure uses the struck keyword, the declarative class uses the class keyword, and the forward method
The transfer structure is passed through values instead of references. Unlike classes, the New Keyword can be used for Schema Instantiation. Class.
2. What are the conditions for deadlock? How to overcome it?
A: The system has insufficient resources, the process promotion sequence is inappropriate, and the resource allocation is improper. Each resource can only be used by one process, and one resource requests resources, at this time, the resource is blocked and the acquired resource is not put.
Cannot be forcibly deprived before the resource is used up.
3. Can an interface inherit the interface? Can an abstract class implement interfaces? Can an abstract class inherit an object class?
A: An interface can inherit interfaces. An abstract class can implement interfaces. An abstract class can inherit object classes. However, a condition is that the object class must have a clear constructor.
4. Can constructor be inherited? Can be overwritten?
A: constructor cannot be inherited, so it cannot be overwritten, but can be overloaded ).
5. Is it OK?Inherit string class?
A: Because the string class is a final class, the string class cannot be inherited.
5. Can other threads enter the method of an object after a thread enters the method of an object?
A: No. The method of an object can only be accessed by one thread.
6. Use the most effective method to calculate the number of equal 8 pairs?
Answer: 2 <3.
7,C #Can I directly perform operations on the memory?
A: This question is difficult to answer. It is also a big question. However, you can answer questions in this way. C # can directly operate on the memory. Although pointers are rarely used, C # can use pointers.
Added unsafe and used the garbage collection mechanism (GC) function in. Net, which replacesProgramBut the Finalize method cannot be directly used in C #. Instead, the finalize () method of the base class is called in the destructor.
7. Does the array have length () and method? Does string have this method?
A: This method is not available in the array, but it has this attribute. This method is available in string.
8. What is the difference between error and exception?
A: Error indicates that the restoration is not impossible, but it is very difficult. Exception indicates an actual or practical problem. It indicates that the program runs normally and cannot occur.
9. What are the differences between final, finally, and finallize?
A: Final is used to declare attributes. Methods and classes indicate that attributes are unchangeable, methods cannot be overwritten, and classes cannot be inherited.
Finally is the part in the structure of the exception handling statement that is always executed.
Finallize indicates an object class method. When executed in the garbage collection mechanism, the method of the object to be recycled is called.
10. What is the difference between hashmap and hashtable?
A: hashmap is a lightweight Implementation of hashtable. All non-thread-safe implementations implement the map interface. The main difference is that the hashmap key value can be null and the efficiency can be higher than that of hashtable.
11. What is the difference between collection and collections?
A: collection is the upper-level interface of the Collection class. collections is a help class for the Collection class. It provides a series of static methods for searching, sorting, and thread-safe operations on various sets.
12. What is delegation in C? Is an event a delegate?
A: delegate is a safe way similar to function pointer, but it is much safer than pointer. It can pass a method as a parameter to another method, it can be understood as a reference to a function. An event is a message mechanism, which is
A delegate without a method body.
13. What is the difference between override and overload?
A: override indicates the method used to override the base class. In addition, the method name, return type, parameter type, and number of parameters must be the same as that of the base class.
Overload indicates that the method of the base class is overwritten, but the method name can be different if it is the same.
14. When you need to pass variable values in a bsstructure, you cannot use sessions, coolke, and application. How many methods do you have?
A: This. server. Transfer, querystring.
15. Can I use the C # indexer to implement a digital index?
A: No. It can be of any type.
15. Can I use the C # indexer to implement a digital index?
A: No. It can be of any type.
16. Is there a new usage?
A: There are three types. The first type is instantiation, for example, new class ()
The second method is to hide the base class using public new.
Third, any type parameter in the generic class declaration must have a common no-argument constructor.
17. Any one that copies an array to the arraylist?
A: foreach (Object o in array), arraylist. Add (0)
There are many methods. Think for yourself.
18. Overview of reflection and serialization?
A: Reflection: it is still difficult to define the next launch. Let's talk about my understanding here. Reflection provides encapsulated assembly, module, and type object. You can use reflection to dynamically create a type instance and bind the type to an existing object.
Or get the type from the existing object type, and then call the method or access field and attribute of the type.
Serialization: the process of converting an object to a format transmitted by another media. For example, serialize an object, Use http to pass the object between the client and server over the Internet, and use deserialization on the other end to obtain
Image.
19, const and readonly?
A: const is used to declare constants during programming, and readonly is used to declare the runtime constant.
20. What are the similarities and differences between UDP and TCP connections?
A: TCP is a transmission control protocol that provides connection-oriented and reliable byte stream services. When users and servers exchange data with each other, data can be transmitted only after a TCP connection is established before data interaction.
. TCP provides the time-out redial function to verify data. UDP is a User Datagram Protocol, a simple datagram-oriented transmission protocol, and an unreliable connection.
21. How do processes and threads understand each other?
A: A process is a program running unit larger than a thread. It is a system running unit experienced by the operating system. A program must have at least one process and one process, there must be at least one thread, and the thread division scale should be better than the process
A small number of processes have independent memory units, and threads share the memory, which greatly improves the program running efficiency. multiple threads in the same process can be executed concurrently.
22. asp. How many methods can be used to pass values between pages?
A: querystring, session, cookies, application, server. Transfer, respose. redictor.
41. What is an application domain? What is managedCode? What is a strong system? What is packing and unpacking? What is overload? What are the explanations of CTS, CLS, and CLR?
A: application domain: it is the isolation boundary for security, reliability, isolation, and version control, and uninstallation. It is usually created by the runtime host, and the application domain provides a safer and more widely used processing ticket
RMB.
Managed code: the code written by the CLR compilation language editor is called managed code.
Packing and unpacking: the process of converting the value type to the reference type is implicit. The opposite process is unpacking and explicit.
CTS is a public-type system, CLS is a public-language standard, and CLR public-Language Runtime Library.
Strongly typed system: each variable and object must have a declarative type.
41. What is the difference between the value type and the reference type?
A: The value of the value type is stored in the stack. Changing the value does not change the original value of the variable. The value of the reference type is stored in the stack, the referenced address is stored in the stack. changing its value changes the original value of the variable.
. The value type cannot contain null values. However, the null type can be assigned to the value type L.
42.asp.net what are the authentication methods?
A: Windows, forms, and passport
43. What are the meanings and functions of UDDI and WSDL?
A: UDDI is a unified description Integration Protocol. It is a set of web-based, distributed, and standardized information registration implementation standards for Web Services, at the same time, it registers for Web services that are also provided for the enterprise itself, so that other enterprises can discover and
Protocol standard for access. Standard-based specifications are provided for describing and discovering services, and a set of Internet-based implementations are also provided.
WSDL is an XML-based Web service interface.
44. What is soap?
A: simple access protocol. Is a protocol for exchanging information and implementing remote calls in a distributed environment. Is an XML-based protocol. With soap, you can ignore any transmission protocol, but it is usually the HTTP protocol.
What types of objects or code can communicate with each other in any language on any platform. It is a lightweight protocol.
45. How to deploy an Asp.net page?
A: There is a publishing mechanism in vs2003 and vs2005. vs2003 can be released and deployed in replication.
Vs2005 can be directly deployed to the corresponding location.
46. How to understand the garbage collection mechanism in. Net?
A: The garbage collection mechanism in. Net refers to the collection and release of memory by reference programs. When an object is created with the New Keyword each time, the runtime database allocates memory for it from the managed heap, because the space is limited, and the final Garbage Collector
Memory is recycled. The memory has been released and used again.
47. What are the three basic object-oriented principles?
A: encapsulation, inheritance, and polymorphism.
48. What is the base class of all classes in. Net?
A: object.
50. Can I use foreach to traverse the accessed object?
A: You need to implement the ienumerable interface and the getenumerator () method.
51. What is the difference between heap and stack?
A: heap is a heap, and space is allocated and released by manual operations. It has a large free storage zone.
The stack is automatically allocated and released by the operating system, and the space on the stack is limited. During compilation, both the variable and function allocation memory are performed on the stack, and the parameter transfer during function calling is also performed on the stack.
.