Intermediate. NET developers
1) explain the differences between interface-oriented, object-oriented, and Aspect-Oriented Programming
APIs are more concerned with concepts. The principle is to define the behavior norms first, and then create and implement them according to the behavior norms. Strictly speaking, interfaces should be part of the object-oriented model, because object-oriented also emphasizes the Dependency inversion principle, that is, implementation depends on abstraction, while abstraction does not depend on specific implementation. What's more, it should be interface-oriented and abstract-oriented, my experience is that the interface is more flexible, but the implementation is a little bitCodeRedundancy, while abstract-oriented can be combined with interface-oriented, first defining interfaces, then defining abstract classes, processing some public logic in abstract classes, and then implementing specific classes. Object-oriented is the decomposition of complex problems. Aspect-oriented programming is a new concept that solves many problems that object-oriented cannot solve. For example, object-oriented technology can only modularize business-related code, however, it is impossible to modularize the code unrelated to the business. Aspect orientation is the solution to solve this problem. Its key idea is to "applyProgramThe business logic in is separated from the general service that provides the support ".
2) What is interface? What is the difference between it and abstract class?
Interfaces are used to define behavioral norms without specific implementations. abstract classes can be partially implemented in addition to defining behavioral norms, but a class can implement multiple interfaces, but only one parent class can be inherited.
3) What is reflection?
An Assembly contains a module, and a module includes a type. There are members under the type. Reflection is the management assembly, module, and type object. It can dynamically create instances of the type, set the existing object type or obtain the existing object type. You can call the method of the type and the field attribute of the access type. It is created and used at runtime.
4) What is the difference between the XML Web Service using asmx and the. NET remoting service using soap?
The message mechanism used by the web service, while the rpc. Web Service used by remoting can be used on different platforms and languages. remoting is only applicable to. net. Remoting is more efficient than XML Web Service.
5) is the type system represented by XMLSCHEMA? Is CLS represented by XMLSCHEMA?
Not clear
6) What is the difference between early-binding and late-binding?
This is similar to the strong and weak types. The pre-binding determines the data to be bound during compilation, and the post-binding completes data filling during running. Therefore, if binding fails in the early stage, a compilation error will be reported during compilation, and later binding fails only at runtime.
7) Call assembly. Load to calculate static reference or dynamic reference?
Dynamic
8) When to use assembly. loadfrom? When to use assembly. LoadFile?
Haha, this is quite interesting. Compared with LoadFile, loadfrom is not authentic, because when it takes a daughter-in-law, it is to let people wear dowry, sit in the carriage, and have to take their sister, :) It is used to load the assembly, which requires that the Assembly on which this Assembly depends be loaded at the same time. While LoadFile is a lot more authentic. It loads the content of the Assembly file, and only loads the file of the input parameter, regardless of the Assembly dependency, but if there is the same implementation, however, loadfrom cannot be used to load files with different locations, but LoadFile can. Because LoadFile loads a file, after calling it, it may be unable to be executed due to the lack of necessary dependencies.
9) What is Assembly qualified name? Is it a file name? What's the difference?
It is not a file name. Compared with the file name, Assembly qualified name (Assembly qualified name) can better determine an assembly. It contains the file name, but also contains the version, public key, and region. The file with the same name may have different versions and regions. In this case, the file name alone may cause the correctness of the assembly to be uncertain.
10) Assembly. Load ("foo. dll"); is this statement correct?
Error. The correct one should be assembly. Load ("foo"); or assembly. loadfrom ("foo. dll"); (thanks to Tristan (guozhijian) for prompt correction)
11) What is the difference between an assembly with strong signatures and an assembly without strong signatures?
A strongly signed assembly can be made into com without strong signature. A strongly signed assembly can be installed in GAC without strong signature.
12) can datetime be null?
No, because it is of the struct type, and the structure belongs to the value type. The value type cannot be null. Only the reference type can be assigned null.
13) What is JIT? What is ngen? What are their limitations and benefits?
Just in time is compiled in a timely manner. It is compiled when the program is run for the first time. ngen is called pre-jit, which means that the native image of the Assembly will be generated before running, and save it to the global cache. ngen can accelerate assembly loading and execution because it can restore the code and data structure from the local image, instead of generating them dynamically as JIT does. The reason for caching is similar.
14) What is the difference between finalize () and dispose?
Finalize () is used to implicitly release resources, and dispose () is used to display the release resources (finalize () is indeed equivalent to the destructor in C ++ (thanks to Jeffrey Zhao for prompting correction)
15) is the using () syntax useful? What is idisposable? How it achieves the final certainty.
Is used to create an idisposiable class in using. After using is completed, the dispose method of the object is called to release resources. I don't understand what is the end of certainty
16) What is the tasklist/M "mscor *" command?
Lists all processes and modules that use a DLL or EXE starting with "mscor ".
17) differences between in-Proc and out-of-Proc
In-Proc is the process, where code and data blocks can be shared within the process, out-of-Proc is the process, and inter-process interoperability needs to be achieved through inter-process communication.
18) which technology in. Net can implement out-of-Proc communication?
. Net remoting technology or WCF Technology
19) which process does ASP. NET run on Windows XP, Windows 2000, and Windows 2003 respectively?
XP: aspnet_wp.exe Windows 2000: aspnet_wp.exe Windows 2003: w3wp.exe