. Net interview Summary

Source: Internet
Author: User
Tags ole

Net Job Search Technology Summary

[. Net (C #)]
Translate attribute into features to identify classes and Methods
Translate property into attributes and properties for accessing fields of the class.
It is better to translate a markup into a tag.

[. Net (C #)]
The core of. NET Framework is the execution environment of its Runtime Library.
It is called the Common Language Runtime Library (CLR) or. NET Runtime Library.
Usually run under the control of CLRCodeManaged code ).
TheSource codePreviously, we needed to compile them into an intermediate language (IL), and CLR then compiled il into platform-specific code.

ProgramAn assembly is a logical unit that contains compiled. NET Framework-oriented code.
The executable code and library code use the same assembly structure.
An important feature of an assembly is that the metadata they contain describes the types and methods defined in the corresponding code.

[. Net (C #)]
ASP pages are sometimes slow to display, because the server-side Code is interpreted rather than compiled.
Because ASP code is not structured, it is difficult to maintain, and ASP does not support error processing and syntax check.
ASP. NET pages are structured. Each page is a class that inherits the. NET class system. Web. UI. Page.
In addition, the background encoding function of ASP. NET allows further structured methods.
A page request is a high-speed cache of ASP. NET pages after compilation with the Web server.

[. Net (C #)]
Override and overload ):
Overwrite refers to the method by which the subclass redefines the virtual function of the parent class.
Overload means that multiple functions with the same name are allowed, and the parameter tables of these functions are different (maybe the number of parameters is different, maybe the parameter types are different, or both are different ).
In fact, the concept of heavy load does not belong to "Object-Oriented Programming ",
The implementation of overloading is: the compiler modifies the name of a function with the same name based on different parameter tables of the function.
Then these functions with the same name become different functions (at least for the compiler ).
For example, there are two functions with the same name: function func (P: integer): integer; and function func (P: string): integer ;.
The modified function names of the compiler may be: int_func and str_func.
For the call of these two functions, it has been determined between the compilers that it is static (remember: It is static ).
That is to say, their addresses are bound during compilation (early binding ),
Therefore, overloading is irrelevant to polymorphism! "Overwrite" is related to polymorphism ".
When the subclass redefined the virtual function of the parent class, the parent class pointer is dynamic based on the different subclass pointer assigned to it (remember: Dynamic !) This function belongs to the subclass,
Such a function call cannot be determined during compilation (the virtual function address of the called subclass cannot be provided ).
Therefore, such a function address is bound at runtime (later bound ).
The conclusion is that overload is only a language feature and is irrelevant to polymorphism and object orientation!

[. Net (C #)]
Differences between ref and out in C:
The out method parameter keyword on the method parameter enables the method reference to pass to the same variable of the method.
When the control is passed back to the call method, any changes made to the parameters in the method will be reflected in this variable.
When you want the method to return multiple values, it is very useful to declare the out method.
You can still return a value using the out parameter. A method can have more than one out parameter.
To use the out parameter, you must use the parameter as the out parameter to pass it to the method explicitly. The value of the out parameter is not passed to the out parameter.
You do not need to initialize the variable passed as the out parameter. However, the out parameter must be assigned a value before the method is returned.
The property is not a variable and cannot be passed as an out parameter.

The ref method parameter keyword in the method parameter allows the method reference to pass to the same variable of the method.
When the control is passed back to the call method, any changes made to the parameters in the method will be reflected in this variable.
To use the ref parameter, you must explicitly pass the parameter as the ref parameter to the method.
The ref parameter value is passed to the ref parameter. Parameters passed to the ref parameter must be initialized first.
Compared with the out parameter, the latter parameter does not need to be explicitly initialized before being passed to the out parameter.
Attributes are not variables and cannot be passed as REF parameters.

Both are transmitted by address, and the original values are changed after use.
Ref can pass the value of the parameter to the function, but the out parameter must be cleared.
That is to say, you cannot pass a value from out. After an out value is input, the parameter value is null, so you must initialize it once.
There are two differences: ref indicates inbound and outbound, while out indicates outbound.

[. Net (C #)]
Differences between ADO and ADO. Net:
Ado uses the ole db interface and is based on Microsoft's COM technology
Ado. Net has its own ADO. net interface and is based on Microsoft's. NET architecture.
ADO is stored in recordset, while ADO. NET is represented in dataset.
The recordset looks more like a single table. If you want the recordset to be represented in multiple tables, you must connect multiple tables in SQL.
Instead, dataset can be a set of multiple tables. The operation of ADO is an online method, which means that both browsing and updating data must be real-time.
Ado. net uses the offline method. when accessing data, ADO. net uses XML to make a copy of the data.
Ado. Net databases must be connected online only during this period.

Since ADO uses the COM technology, this requires that the data type used must comply with the COM specification.
However, ADO. NET is based on XML format and has richer data types without the need for data type conversion caused by com orchestration, thus improving the overall performance.
ADO. NET provides an Optimized Data Access Model for the. NET architecture. It is similar to the com-based ADO.

there is a big difference between ado.net and ADO:
1.ado.net follows a more general principle and is not so dedicated to databases.
ado.net is a collection of all classes that allow data processing. These classes represent data container objects with typical database functions (such as indexing, sorting, and views.
although ado.net is. NET database application authoritative solution
but from the overall design perspective, it is not as database-centric as the ADO data model, which is a major feature of ado.net.
2. currently, ado.net provides two types of database access class libraries: one for SQL Server 7.0 or later
and the other for all other OLE DB providers that you may have installed.
in both cases, you use different classes, but follow similar naming rules.
except for the prefix, the names are the same. The prefix of the former case is SQL, and the latter case is oledb.
the. NET Framework also provides the ODBC. NET data access mode.
ODBC. NET data provider is.. NET Framework, which can access the original ODBC driver
like ole db. NET data provider can access the original ole db providers.
currently, it has only been tested in the following drivers:
Microsoft SQL ODBC driver, Microsoft ODBC driver for Oracle, and Microsoft JET ODBC driver.
3.ado.net provides two formations for processing data extracted from the data source. They are DataSet and datareader objects.
the former is the cache recorded in the memory. You can access and modify it in any direction.
the latter is a highly optimized object designed for Rolling read-only records in the forward mode only.
4.ado.net unifies the data container programming interfaces. No matter what applications you plan to write, Windows Forms, web forms, or web services, you can use the same group of classes to process data.
.
no matter the number of data sources at the backend, the SQL Server database, OLE DB, XML file or an array
you can scroll and process their content using the same methods and attributes.
5. In ADO, XML is only in the input and output formats.
however, in ado.net, XML is a data format that provides a means to operate, organize, share, and transmit data.

ADO. What are the main improvements to net over ado?
1: ado.net does not rely on the ole db provider, but uses. Net to host the provided program,
2: Do not use com
3: dynamic cursors and server games are not supported
4: You can disconnect the connection and keep the current dataset available.
5. Forced type conversion
6: XML support

[. Net (C #)]
New Keyword usage
(1) the new operator is used to create objects and call constructors.
(2) The new modifier is used to hide the inherited members from the base class members.
(3) The new constraint is used to restrict the types of parameters that may be used as type parameters in a generic declaration.
Any type parameter in the specified generic class declaration must have a common non-parameter constructor.

[. Net (C #)]
In C #, string STR = NULL and string STR = "", indicating the difference.
String STR = "" Initializing object allocation space
String STR = NULL initialization object

[. Net (C #)]
What data sources can be connected to by datasouse of DataGrid?
Datatable dataview dataset dataviewmanager any component that implements the ilistsource interface or any component that implements the ilist Interface

[. Net (C #)]
Overview reflection and serialization
Reflection: the Common Language Runtime Library loader manages application domains.
Such management includes loading each assembly to the corresponding application domain and controlling the memory layout of the type hierarchy of each set.
The Assembly contains modules, while the module contains types and types including members.
Reflection provides encapsulated assembly, module, and type objects.
You can use reflection to dynamically create instances of the type, bind the type to an existing object, or obtain the type from an existing object.
Then, you can call methods of the type or access its fields and attributes.

Serialization: serialization is the process of converting the object state to a format that can be maintained or transmitted.
In contrast to serialization, deserialization converts a stream into an object.
These two processes can be combined to easily store and transmit data.

[. Net (C #)]
What are the accessibility levels?
Public access is unrestricted.
Protected access is limited to include classes or types derived from include classes.
Internal access is limited to the current Assembly.
Protected internal access is limited to the current Assembly or type derived from the include class.
Private access is limited to the inclusion type.

[. Net (C #)]
O/R Mapping Principle: Use reflection to configure ing between objects and database tables.

[. Net (C #)]
What are the characteristics of the sealed modifier?
The sealed modifier indicates sealed. When used for a class, it indicates that the class cannot be inherited.
It cannot be used together with abstract, because the two modifiers are mutually exclusive in meaning.
When used for methods and attributes, it indicates that the method or attribute cannot be inherited and must be used together with the override keyword.
Because the method or attribute using the sealed modifier must be a virtual Member of the base class.
It is usually used to implement third-party class libraries that do not want to be inherited by the client, or for classes that do not need to be inherited to prevent hierarchy confusion caused by misuse of inheritance.
The proper use of the sealed modifier can also improve the running efficiency, because the inherited class will overwrite the member.

[. Net (C #)]
Similarities and differences between class and struct in. net
The structure shares almost all the same syntaxes with the class, but the structure is more restricted than the class:
Although the static fields of the structure can be initialized, the structure instance field declaration still cannot use the Initial Value Setting item.
The default constructor (constructor without parameters) or destructor cannot be declared in the structure.
The structure copy is automatically created and destroyed by the compiler, so the default constructor and destructor are not required.
In fact, the compiler assigns default values to all fields (see the default table) to implement the default constructor.
The structure cannot be inherited from a class or other structure.
Structure is a value type -- if an object is created from the structure and assigned to a variable, the variable contains all the values of the structure.
When copying a variable that contains a structure, all data will be copied, and any modifications made to the new copy will not change the data of the old copy.
Because the structure does not use references, the structure is not identified-two value-type instances with the same data cannot be distinguished.
All value types in C # are essentially inherited from valuetype, and the latter is inherited from object.
The compiler can convert the value type to the reference type in a process called packing.

The structure has the following features:
The structure is the value type, and the class is the reference type.
When a structure is passed to a method, the structure is passed by passing values, rather than being passed as a reference.
Unlike classes, the new operator can be used for structure instantiation.
The structure can declare constructors, but they must contain parameters.
A structure cannot inherit from another structure or class, and cannot be the base of a class.
All structures are directly inherited from system. valuetype, and the latter is inherited from system. object.
Structure can implement interfaces.
It is incorrect to initialize the instance field in the structure.

Differences between classes and structures
1. value Type and reference type
structure is value type: value type is assigned address on the stack, and all base types are structure types
for example, int corresponds to system. int32 structure. String corresponds to system. string Structure. You can create more value types by using the structure.
the class is a reference type: the allocation of address stacks on the stack is more efficient than that on the stack.
however, the stack resources are limited and it is not suitable for processing large logical and complex objects.
structure processing is a small object to be treated as a base type, while class processing is a commercial logic
because the structure is a value type, values between structures can be assigned to create a new structure, the class is a reference type, and the assignment between classes is just a copy reference. Note:
1. although the structure is different from the class type, their base types are all objects. in C #, all types of base types are objects.
2. although the new operator is used for structure initialization, the structure object is still allocated to the stack instead of the stack.
If "new" (new) is not used, before all fields are initialized, the field remains unassigned and the object is unavailable
2. inheritance
Structure: The structure cannot be inherited from another structure or class.
although the structure is not explicitly declared using sealed, the structure is implicit sealed.
class: fully scalable. Unless the declared sealed is displayed, the class can inherit other classes and interfaces, and itself can also be inherited.
note: although the structure cannot be inherited, the structure can inherit interfaces. methods are the same as class inheritance interfaces.
example: structure implementation interface
interface iimage
{< br> void paint ();
}< br> struct picture: iimage
{< br> Public void paint ()
{< br> // painting code goes here
}< br> private int x, y, z; // other struct members
}

3. Internal Structure:
Structure:
No default constructor exists, but you can add constructor.
No destructor
No abstract and sealed (because it cannot be inherited)
The protected modifier cannot exist.
You do not need to use new for initialization.
It is incorrect to initialize the instance field in the structure.
Class:
Default constructor available
Destructor
Abstract and sealed can be used.
There is a protected Modifier
New must be used for initialization.

[. Net (C #)]
How to Select structure or Class
1. The stack space is limited. For a large number of logical objects, creating classes is better than creating structures.
2. structure indicates lightweight objects such as vertices, rectangles, and colors
For example, if an array containing 1000 vertex objects is declared, additional memory will be allocated to each referenced object.
In this case, the structure cost is low.
3. Classes are the best choice for presentation of abstract and multi-level object Layers
4. In most cases, this type is the best choice for structure when it is only some data.

[. Net (C #)]
What is the difference between abstract class and interface?
A: The class that declares the existence of a method instead of implementing it is called the abstract class)
It is used to create a class that reflects some basic behaviors and declare methods for this class, but it cannot implement this class in this class.
You cannot create an abstract instance.
However, you can create a variable whose type is a image class and point it to an instance of a specific subclass.
There cannot be a pumping constructor or a pumping static method.
The subclasses of abstract classes provide implementation for all the image extraction methods in their parent classes, otherwise they are also image extraction classes.
Instead, implement this method in the subclass.
Other classes that know their behavior can implement these methods in the class.

An interface is a variant of the image class.
In the interface, all methods are extracted.
Multi-inheritance can be achieved by implementing such an interface.
All methods in the interface are drawn, and none of them has a program body.
The interface can only define static final member variables.
The implementation of an interface is similar to that of a subclass, except that the implementation class cannot inherit behaviors from the interface definition.

When a class implements a special interface, it defines (to be given by the program body) all the methods of this interface.
Then, it can call the interface method on any object of the class that implements this interface.
Because of the image class, it allows the interface name to be used as the type of the referenced variable. Normally, dynamic Association editing will take effect.
The reference can be converted to the interface type or from the interface type. The instanceof operator can be used to determine whether the class of an object implements the interface.

Interfaces can inherit interfaces.
Image extraction class can be implemented (implements) Interface
Whether the image class can inherit the concrete class, but the premise is that the object class must have a clear constructor.

[. Net (C #)]
What is an application domain? What is managed code? What is a strong system?
What is packing and unpacking? What is overload? What are the explanations of CTS, CLS, and CLR?

Application domain:
Application domains provide isolation boundaries for security, reliability, version control, and uninstallation of an assembly.
The application domain is often created by the runtime host, which directs the Common Language Runtime Library before running the application.
The application domain provides a safer and more useful processing unit, which can be used by the Common Language Runtime Library to provide isolation between applications.
The application domain can be understood as a lightweight process. Security. Small resource occupation.

Managed code:
The code developed using a language compiler based on the Common Language Runtime Library is called managed code. Hosted code has many advantages,
For example, cross-language integration, cross-language Exception Handling, enhanced security, version control and deployment support, simplified component interaction model, debugging and analysis services.

Packing and unpacking:
Convert from value type interface to reference type: boxed.
Convert from reference type to value type: unpack.
Binning and unboxing enable value types to be considered objects.
Binning the value type package it into an instance of the object reference type.
This allows the value type to be stored in the garbage collection heap.
The value type is extracted from the object.

Overload:
Each type of member has a unique signature.
A Method signature consists of a method name and a list of parameters (the order and type of parameters.
As long as the signature is different, you can define multiple methods with the same name in one type.
When two or more methods with the same name are defined, they are called overload.

CTS common type system ):
A specification that determines how the Runtime Library of a common language defines, uses, and manages the types.

CLR Common Language Runtime Library:
. NET Framework provides a runtime environment called a Common Language Runtime Library.
It runs code and provides services that make the development process easier.

CLS public language specifications:
To fully interact with other objects, regardless of the language in which these objects are implemented.
Objects must only disclose the common functions of all languages they must interact.
To this end, the public language specification (CLS) is defined, which is a set of basic language functions required by many applications.

Strong type:
C # is a strongly typed language. Therefore, each variable and object must have a declaration type.

[. Net (C #)]
What is the difference between the value type and the reference type?
A value-type variable directly contains values.
When a value type variable is assigned to another value type variable, the included values are copied.
This is different from the value assignment of the referenced type variable. The value assignment of the referenced type variable only copies the reference of the object, rather than the object itself.

All value types are implicitly derived from system. valuetype.
Different from the reference type, the new type cannot be derived from the value type. But what is the same as the reference type is that the structure can also implement interfaces.
Unlike the reference type, the value type cannot contain null values. However, the null type function allows null to be assigned to the value type.
Each value type has an implicit default constructor to initialize the default value of this type.
The value type consists of two types: Structure and enumeration.
The structure is divided into the following types:
Numeric (numeric) type, integer, floating point type, decimal, bool, user-defined structure.
Variables of the reference type, also known as objects, can store references to actual data.
Declare the keyword of the reference type: Class, interface, Delegate, built-in reference type: object, string

Value Type reference type

Memory Allocation location allocation in stack allocation in heap
High efficiency, no need for low address conversion efficiency, need for address conversion
After the memory is recycled, It is not recycled immediately after it is recycled.
Creates a new object with the same value and only references the original object.
Function parameters and return values indicate that copying an object is a reference of the original object and does not generate a new object.
Type expansion is not easy to expand, easy to expand, and Type Expansion

[. Net (C #)]
How to Understand Delegation
The delegate is similar to a C ++ function pointer, but it is type-safe.
The delegate allows passing methods as parameters.
A delegate can be used to define a callback method.
The delegate can be linked together. For example, multiple methods can be called for an event.
The method does not need to be exactly matched with the delegate signature. For more information, see covariant and inverter.
C #2.0 introduces the concept of anonymous methods, which allow passing code blocks as parameters instead of Individually Defined methods.

[. Net (C #)]
What are the similarities and differences between interfaces and classes in C.
Differences:
The interface cannot be instantiated directly.
The interface does not contain the implementation of methods.
Interfaces, classes, and structures can be inherited from multiple interfaces.
However, C # only supports single inheritance: the class can only be inherited from one base class.
Class definition can be split between different source files.

Same:
Interfaces, classes, and structures can be inherited from multiple interfaces.
An interface is similar to an abstract base class: any non-Abstract type that inherits an interface must implement all the members of the interface.
Interfaces can contain events, indexers, methods, and attributes.
A class can implement multiple interfaces.

[. Net (C #)]
What are the authentication methods of Asp.net?
Windows Authentication provider
Provides authentication for Windows and Microsoft Internet Information Service (IIS)
Used in combination to ensure the security of ASP. NET applications.

Forms authentication provider
Provides information about how to use your own code to create an application-specific logon form and perform authentication.
One easy way to use forms authentication is to use ASP. NET membership and ASP. NET login controls
Together, they provide a way to collect, verify, and manage user creden。 with little or no code.

Passport Authentication provider
Provides information about the centralized authentication service provided by Microsoft, which provides single logon and core configuration for member sites

[. Net (C #)]
Role of the Active Directory
Active Directory stores information about network objects and allows administrators and users to easily find and use the information.
Active Directory uses a structured data storage method, which serves as the basis for logical hierarchical organization of directory information.

[. Net (C #)]
Meanings and functions of UDDI and WSDL
UDDI: unified description, discovery, and integration protocols (UDDI, Universal Description, discovery and integration)
It is a set of web-based, distributed information registration centers that provide Web Services with standards and specifications,
It also includes a set of access protocols that enable enterprises to register their web services so that other enterprises can discover.
UDDI provides a set of standards-based specifications for describing and discovering services and a set of Internet-based implementations.

WSDL: WSDL describes the public interfaces of Web Services.
This is an XML-based service description about how to communicate with and use web services;
Service URL and namespace
Network Service Type
(It may also include soap function calls. As I have said, WSDL is sufficient to describe a wide range of network services)
Valid function list
Parameters of each function
Type of each parameter
Return values and Data Types of each function

[. Net (C #)]
What is soap and what applications are there.
A: Simple Object Access Protocol (SOAP)
It is a protocol used to exchange information and execute remote process calls in a distributed or distributed environment. It is an XML-based protocol.
When using soap, you do not need to consider any specific transmission protocol (the most common protocol is HTTP)
Any type of objects or code can communicate with each other in any language on any platform.
This type of communication uses messages in XML format.

Soap, also known as xmlp, provides a standard working mechanism for two programs to exchange information.
It is absolutely necessary to develop standards for the electronic collaboration between various institutions.

Soap describes how to bind a message to XML.
It also describes the sender of the sent message, the content and address of the message, and the time when the message was sent.
Soap is the basic communication protocol for Web Services.
The SOAP specification also defines how to use XML to describe program data and how to execute RPC (Remote Procedure Call ).
Most soap solutions support RPC-style applications.
Soap also supports document-style applications (soap messages only contain XML text information ).

Finally, the SOAP specification defines how HTTP messages transmit soap messages.
MSMQ, SMTP, and TCP/IP can all be used as soap transmission protocols.

Soap is a lightweight protocol used to exchange structured information in a distributed and distributed environment.
Soap uses XML technology to define an extensible message processing framework. It provides a message structure that can be exchanged through multiple underlying protocols.
The design idea of this framework is to be independent from any specific programming model and the semantics of other specific implementations.

Soap defines a method to transmit XML messages from point A to point B.
Therefore, it provides a Message Processing Framework Based on XML and has the following features:
1) scalability
2) It can be used through multiple underlying network protocols
3) independent from the programming model.

[. Net (C #)]
How to deploy an Asp.net page
Both VS 2005 and vs 2003 have a publishing mechanism.
2003 Publish and then copy and deploy.
Vs2005 can be directly deployed to the corresponding location.

[. Net (C #)]
What is GC? Why does GC exist?
A: GC is a garbage collector.
Programmers do not have to worry about memory management, because the Garbage Collector will automatically manage.
To request garbage collection, you can call one of the following methods:
System. GC ()
Runtime. getruntime (). GC ()
However, the Finalize method cannot be directly implemented in C #, but the finalize () method of the base class is called in the destructor.

[. Net (C #)]
How to Understand the garbage collection mechanism in. net
The. NET Framework Garbage Collector manages the memory allocation and release of applications.
Every time you create an object using the new operator, the runtime allocates memory for the object from the managed heap.
As long as the address space in the managed heap is available, the runtime will continue to allocate space for new objects.
However, the memory is not infinitely large. Eventually, the garbage collector must recycle to release some memory.
The garbage collector Optimization engine determines the best time to recycle based on the ongoing allocation.
When the Garbage Collector executes the recycle action, it checks the objects in the managed heap that are no longer used by applications and performs necessary operations to recycle the memory they occupy.

[. Net (C #)]
Lists several methods for passing values between ASP. NET pages. And their advantages and disadvantages.
A. 1). Use querystring, such ....? Id = 1; response. Redirect ()....
2). Use session Variables
3). Use server. Transfer

Session (viewstate) is simple but easy to lose
Application global
Cookies are simple but may not be supported and may be forged.
Input tType = "hidden" is simple and may be forged
URL parameters are simple and displayed in the address bar. The database with limited length is stable and secure, but its performance is relatively weak.

[. Net (C #)]
In C # Can I use any type of index to implement the indexer? (Such as numbers)

[. Net (C #)]
What are the explanations of CTS, CLS, and CLR?
CTS: general language system.
CLS: general language specification.
CLR: Common Language Runtime Library.

[. Net (C #)]
Which classes are required for reading and writing databases in. Net? What are their roles?
Dataset: data storage.
Datacommand: Execute the statement command.
Dataadapter: a collection of data.

[. Net (C #)]
In. net, accessories mean assembly. (Intermediate language, source data, resources, assembly list)

[. Net (C #)]
What are common WebService call methods?
A: 1.use the wsdl.exe command line tool.
2. Use the Add web reference menu option in vs. net

[. Net (C #)]
Understanding and Practical Application of remoting and WebService under the framework of Microsoft. NET.
The working principle of. Net remoting is that the server sends a process number and a program domain number to the client to determine the location of the object.
WS primarily uses http to penetrate the firewall. Remoting can improve the efficiency by using TCP/IP and binary transmission.
Remoting is a technology used in. Net to call methods across machines, processes, and AppDomains.
The remoting technology can be used to construct a three-structure program.
It is the basic technology of distributed applications.
Web Service is a common model for building applications.
It can also be implemented on all operating systems that support Internet communication.
Web service enables the combination of component-based development and web to achieve the best.

[. Net (C #)]
Is run () or start () used to start a thread ()?
A: To start a thread, call the START () method so that the virtual processor represented by the thread is runable.
This means that it can be scheduled and executed by JVM.
This does not mean that the thread will run immediately.
The run () method can generate the exit sign to stop a thread.

[. Net (C #)]
Can constructor be overwritten?
Constructor cannot be inherited, so overriding cannot be overwritten, but overloading can be overloaded.

[. Net (C #)]
Abstract methods cannot be both static and native. They cannot be synchronized.

[. Net (C #)]
Differences between final, finally, and finalize.
Final: modifier (keyword) If a class is declared as final, it means that it cannot generate a new subclass and cannot be inherited as a parent class.
Therefore, a class cannot be declared both abstract and final.
Declare variables or methods as final to ensure that they are not changed during use.
Variables declared as final must be declared with an initial value, which can only be read and cannot be modified in future references.
Methods declared as final can only be used and cannot be reloaded.
Finally: Provides finally blocks for troubleshooting.
If an exception is thrown, the matched catch clause is executed.
The control then enters the Finally block (if any ).
Finalize: method name.
Java technology allows the use of the finalize () method to perform necessary cleanup before the Garbage Collector clears the image from the memory.
This method is called by the garbage collector when it determines that this object is not referenced.
It is defined in the object class, so all classes inherit it.
Subclass overwrites the finalize () method to sort system resources or perform other cleanup tasks.
The finalize () method is called before the Garbage Collector deletes an object.

[. Net (C #)]
Differences between processes and threads:
A process is the unit in which the system allocates and schedules resources;
A thread is the unit of CPU scheduling and scheduling.
A process can have multiple threads that share the resources of the process.

[. Net (C #)]
Stack and stack differences:
STACK: the stack is automatically allocated and released by the compiler. Variables defined in the function body are usually on the stack.
Heap: usually assigned and released by programmers. The memory allocated by using new and malloc functions is on the heap.

[. Net (C #)]
The role of adding static before member variables and member functions:
They are called common member variables and common member functions, and also known as class member variables and class member functions.
They are used to reflect the status of the class respectively.
For example, a class member variable can be used to count the number of class instances. class member functions are responsible for such statistical actions.

[. Net (C #)]
What are the meanings of using and new keywords in C:
Using introduces namespaces or uses unmanaged Resources
New create an instance or hide the parent class Method

[. Net (C #)]
XML to extend the markup language.
Extensible Markup Language. Tag refers to the information symbol that a computer can understand.
With this tag, computers can processArticle.
You can select an international markup language to define these tags.
For example, HTML can also use a markup language that is freely determined by people like XML. This is the scalability of the language.
XML is simplified and modified from SGML. It mainly uses XML, XSL, and XPath.

[. Net (C #)]
What is code-behind technology.
Answer: aspx, resx, and CS files are separated by code.
HTML code and server code are separated to facilitate code compilation and arrangement.

[. Net (C #)]
Main differences between XML and HTML
1. XML is case-sensitive and HTML is not.
2. In HTML, if the context clearly shows where the section or list key ends,
You can omit the ending mark such as </P> or </LI>.
In XML, the end mark cannot be omitted.
3. In XML, an element with a single tag but no matching ending tag must end with one/character.
In this way, the analyzer does not need to find the end mark.
4. in XML, attribute values must be placed in quotation marks. Quotation marks are usable in HTML.
5. In HTML, You can have attribute names without values. In XML, all attributes must have corresponding values.

[. Net (C #)]
What is the error handling mechanism of. Net?
A: the. NET error handling mechanism adopts the try-> catch-> finally structure.
When an error occurs, it is discarded layer by layer until a matching catch is found.

[. Net (C #)]
Static nested class and inner class are different:
Static nested class is an internal class declared as static. It can be instantiated without relying on external class instances.
In general, internal classes must be instantiated before they can be instantiated.

[. Net (C #)]
What is the difference between error and exception:
Error indicates that recovery is not a serious problem that is impossible but difficult. For example, memory overflow.
It is impossible to expect the program to handle such a situation.
Exception indicates a design or implementation problem.
That is to say, it indicates that if the program runs normally, it will never happen.

[. Net (C #)]
Similarities and differences between UDP and TCP connections:
The former is only transmitted, no matter the data is not available, no connection is required. The latter ensures that the transmitted data is accurate and must be linked.

[. Net (C #)]
C # the common base classes of all objects are: system. object.

[. Net (C #)]
What is the difference between system. String and system. stringbuilder?
System. String is an unchangeable string. The string class is a final class, so it cannot be inherited.
System. stringbuilder stores a variable string and provides some methods to modify the string.

[. Net (C #)]
What is the difference between const and readonly?
Const can be used for local constants.
Readonly is actually the initonly field of the class, obviously it cannot be local.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.