C # typical interview questions in. Net history

Source: Internet
Author: User

A total of 130 questions

1. Briefly describe the access permissions of private, protected, public, and internal modifiers.

A: private Members can be accessed within the class.

Protected: protects members, which can be accessed within the class and in the inheritance class.

Public: A public member. It is completely public and has no access restrictions.

Internal: accessible within the same namespace.

2. List several methods for passing values between ASP. NET pages.

Answer: 1. Use QueryString, such ....? Id = 1; response. Redirect ()....

2. Use Session Variables

3. Use Server. Transfer

4. What is the delegate in C? Is an event a delegate?

A: A delegate can substitute a method as a parameter to another method. A delegate can be understood as a reference to a function.

Yes, it is a special delegate

5. Differences between override and overload

A: What is the difference between override and overload. Overload means that the method name is the same. The parameters or parameter types are different and are reloaded multiple times to meet different needs.

Override is used to Override functions in the base class. To meet your needs.

6. If the variable value needs to be passed in a B/S system, but the Session,

Cookie and Application. How do you handle them?

A: this. Server. Transfer Response. Redirect () --- QueryString

9. To describe the implementation process of the indexer in C #, can it be indexed only by numbers?

A: No. Any type can be used.

11. Use. net for B/S structure. How many layers of structure do you use for development? What is the relationship between each layer and why do you need to layer it like this?

A: Generally, it is three layers.

Data access layer, business layer, and presentation layer.

The data access layer adds, queries, and modifies databases.

The business layer is generally divided into two layers. The business apparent layer communicates with the presentation layer, and the business rule layer Implements user password security.

The presentation layer adds a form to interact with users, for example, users.

Advantages: clear division of labor, clear organization, easy debugging, and scalability.

Disadvantage: increase costs.

Related Article

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.