Net Interview Questions and answers

Source: Internet
Author: User

12. What is an application?ProgramDomain? 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?
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.

Managed code

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

Packing and unpacking

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.

Heavy Load

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 Specification

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.

13. 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 can be divided into the following types: Numeric (numeric type), integer, floating point type, decimal, bool, and 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

14. 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.

15. 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.

16.asp.net identity authentication methods
Windows Authentication provider

Provides information on how to use Windows Authentication with Microsoft Internet Information Service (IIS) authentication 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, which 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

17. 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.

18. Explain the significance and functions of UDDI and WSDL
UDDI

The unified description, discovery, and Integration Protocol (UDDI, Universal Description, discovery and integration) is a set of web-based, distributed, and compliant information registration centers for Web Services, 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;

L service URL and namespace

L type of network service (it may also include soap function calls. As I have said, WSDL is sufficient to describe a wide range of network services)

L list of valid Functions

L parameters of each function

L type of each parameter

L return values and Data Types of each function

19. What is soap?
Simple Object Access Protocol (SOAP) 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 commonly used HTTP protocol). You can allow any type of objects or code to communicate with each other in any language on any platform.

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. To this end, it provides a Message Processing Framework Based on XML and has the following features: 1) scalable, 2) can be used through a variety of underlying network protocols, 3) independent of programming models.

20. 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.

21. 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.

 

this article from the csdn blog, reprinted please indicate the source: http://blog.csdn.net/zxmcl/archive/2008/01/15/2046075.aspx

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.