. NET Classic Face Questions

Source: Internet
Author: User
Tags finally block object serialization hosting what is asp

Microsoft. NET Classic Questions

1. OO object-oriented language has three major features: ________, _________, ________

Answer: encapsulation, inheritance, polymorphism.

2. What is polymorphic? How does C # support polymorphism?

Polymorphism refers to a variety of behaviors. C # can implement polymorphism through method overloading and method overrides.

3. Objects that can be accessed with foreach traversal in C # need to implement the ________________ interface or declaration

The type of the ________________ method.

Answer: IEnumerable, GetEnumerator.

4. What is the GC role of the garbage collector? Why do you have a GC?

For:

a). NET, like Java, belongs to the managed platform, and code written in languages such as C # is executed by CLR hosting.

b) GC is a garbage collector. Programmers don't have to worry about memory management because the garbage collector is automatically managed.

To request garbage collection, you can call one of the following methods:

System.GC ()

Runtime.getruntime (). GC ()

5. Describe the access rights of C # Private, protected, public, and internal modifiers.

For.:

A) Private: a privately-owned member that can be accessed within the class.

b) Protected: A protected member that can be accessed within the class and in the inheritance class.

c) Public: Common members, completely public, without access restrictions.

D) Internal: can be accessed within the same namespace.

6. Lists several ways to pass values between ASP.

For:

A) URL using QueryString, such as ...? id=1; Response. Redirect () ....

b) using the Session object

c) Cache

d) Documents

e) database

7. What is a delegate in C #? Is the event a delegate?

For:

A) The delegate is also the type

b) The delegate is a type-safe pointer

c) The event is a special delegate

8. Override vs. Overload overloads

For:

A) override is an override of a function in a base class.

b) overloading is the same as the name of the method, but the parameter or return value is different.

OO implementations of polymorphic methods.

9. If you need to pass the value of a variable in a B/s structure, you cannot use Session, Cookie,

Application, how many methods do you handle?

For:

a) this. Server.Transfer

b) Cache

c) Documents

d) database

10. What is the general architecture of the. NET development system? , what is the relationship between each layer and why is it so layered?

A: Typically 3-tier architecture

A) data access layer DAL, business layer BLL, display layer PL.

b) Advantages: Clear division of labor, clear, easy to debug, and scalability.

Cons: Increased resource overhead, improved development, and operational costs.

11. What is an application domain AppDomain?

A: Application domains (represented by AppDomain objects) provide isolation, offload, and security boundaries for executing managed code.  Multiple application domains can run in a process, but there is no one-to-many association between application domains and threads. Multiple threads can belong to an application domain, although the given thread is not limited to an application domain, but at any given time, the thread executes in an application domain.

What are CTS, CLS, CLR, respectively, in. NET?

A: CTS: a common language system. CLS: Common Language Specification. CLR: Common language runtime. function similar to

JVM virtual machine, managed execution code.

13. What are crates and unboxing?

A: Inbox conversion from a value type to a reference type is called boxing. OutBox conversions from a reference type to a value type are called

Unpacking.

14. What is managed code?

A: Managed code, refers to the C # or vb.net and other languages written code, not directly compiled into machine code,

Instead, it is compiled into an intermediate-language IL, run by CLR hosting. Java is also a managed language, and code written in Java also belongs to managed code.

What classes are needed for read-write databases in ADO? Their role?

For:

A) DataSet: a DataSet that can store database data offline.

b) DataCommand: Execute statement commands, or execute SQL and stored procedures.

c) DataAdapter: The collection of data, the term fill.

D) SQLConnection provides a link string object

e) DataReader The data reader, reading a row of data at a time.

What are the authentication methods for. ASP. What is the principle of the distinction?

For:

A) Windows (default): Use Window domain validation.

b) from (form) with account: User enters user name and password in form, then submits to server authentication.

c) Passport (key) Microsoft provides services for a fee.

17. What is Code-behind technology?

A: Code after planting. Also called code-behind, is. NET provides a technique for separating the foreground UI code from the background logic code. It is common in Winform, WebForm, WPF, and Silverlight. MVC is no longer supported in the development of

Hold.

What are the methods for calling Web Service in. NET?

For:

A) Use the WSDL.exe command-line tool.

b) automatic generation of client calling code using the ADD Web Reference in Visual Studio

c) Use the Svcutils tool with the WCF band.

d) Custom code constructs a SOAP message call.

How does the. NET Remoting work?

A: The client and the service pass the information through the object serialization, using HTTP, TCP, or IPC, and the service side receives the message and executes the method call. is actually a proxy mode. The WCF framework has a certain degree of reference to the. NET

Remoting programming model, the difference is that WCF can also support cross-platform invocation.

20. In C #, string str = null with string str = "" Try to use text or an image to illustrate the difference.

For:

a) string str = NULL is not allocated to him for memory space,

b) while string str = "" Assigns it a memory space with an empty string length.

21. Please describe the similarities and differences between classes (class) and structure (struct) in dotnet.

For:

A) class belongs to the reference type, is allocated on the heap of memory, can be instantiated,

b) A Struct is a value type that is allocated on the stack of memory.

22. Briefly talk about your understanding of Microsoft. NET Remoting and ASP. Web Service, WCF technology, and

Applications in practice.

For:

a) ASP. NET Web service, Microsoft's early Web services development technology, supported by the WS-protocol. Advanced features such as security, transactions, and so on are not supported using the HTTP protocol.

b) Remoting can only be applied to the. NET platform and cannot be praised by the platform. Can take advantage of TCP/IP,HTTP,IPC

and other agreements.

c) WCF is Microsoft's new distributed development technology that is compatible with legacy ASP. NET Web service, support

The latest WS specifications, such as WS-Security, distributed transactions, and session features. Powerful.

23. Write out an SQL statement: Take the 31st to 40th record in table A (SQL Server, with an auto-growing ID as

Primary KEY, note: The ID may not be contiguous.

For:

Solution 1:select Top * from a where ID not in (select top with ID from a)

Solution 2:select Top * from a Where ID > (select MAX (ID) from (select top with ID from a) as

A

What is the difference between abstract class abstractions and interface in C #?

For:

A) abstract class using an abstract declaration, (abstract class)

b) An instance of the abstract class cannot be created. Implement the method in the subclass. Other classes that know their behavior can be

Class to implement these methods. Achieve polymorphism.

c) Abstract classes can only be single-inherited and may contain methods of implementation.

d) An interface represents a contract, and a constraint relationship (interface) is a variant of an abstract class. In the interface, all methods

are abstract.

e) Multiple inheritance can be obtained by implementing such an interface.

f) interface allows multiple inheritance.

25. Start a thread with run () or start ()?

A: Starting a thread is calling the start () method

26. Can interfaces be inherited by an interface? is an abstract class achievable (implements) interface? Does an abstract class inherit entity classes (concrete Class)?

For:

A) The interface can inherit the interface. Abstract classes can implement (implements) interfaces,

b) whether an abstract class can inherit an entity class, provided that the entity class must have an explicit constructor.

Can the C # constructor Constructor be override?

For:

A) constructor Constructor cannot be inherited, so overriding cannot be overridden,

b) but can be overloaded with overloading.

Can I inherit the String class in C #?

A: The String class is the final class and cannot be inherited.

There is a return statement in try {}, then the code in the finally {} immediately after this try will not be executed, when is it executed, before or after the return?

A: Not necessarily, may execute, A) exception is caught, then execute before return. B) if not captured,

Then the execution of the finally block depends on how you trigger the exception unwind operation. This action also depends on how the computer is set up. Should be said to be executed before {} brackets.

30. Two object values are the same (x.equals (y) = = true), but can have different hash code, this sentence right?

Answer: No, there is the same hash code.

Does the Swtich function on a byte, can it function on a long, or does it work on a String?

Answer: in switch (EXPR1), expr1 is an integer expression. So the arguments passed to the switch and case statements should be int, short, char, or byte. Long,string can not act on Swtich.

32. When a thread enters a synchronized method of an object, whether another thread can enter the object's

Other methods?

No, an synchronized method of an object can only be accessed by one thread.

Whether the method of abstract can be static at the same time, whether it can be native at the same time, whether it can be

Synchronized?

A: Abstract methods can only belong to abstract classes, neither.

What is the difference between the sleep () and wait () methods for thread threads?

For:

A) The sleep () method is the method that causes the thread to stop for a period of time. After the sleep interval expires, the thread does not necessarily

Immediate recovery execution of a running thread is blocked for other reasons.

b) If wait () is a thread interaction, if the thread issues a wait () call to a synchronization object x, the line routines

Pause execution, the object is moved into a wait state until it wakes up or waits for the time to arrive.

35. Talk about final, finally difference in C #

For:

A) final-modifier (keyword) If a class is declared final, it means that it can no longer derive a new child

class, which cannot be inherited as a parent class.

b) finally-provides a finally block to perform any cleanup operations when the exception is processed.

What are the major bugs in the Session, and what solutions is Microsoft proposing?

For:

A) There may be a problem with the loss of session information.

b) is in IIS because of the process recycling mechanism, the system is busy, the session will be lost

c) You can store the Session in Sate server or SQL Server database but this way

Slower, and cannot capture the END event of the Session.

37. What is the difference between a process and a thread?

For:

A) process is the unit in which the system allocates and dispatches resources;

b) A thread is a unit of CPU Dispatch and dispatch, a process can have multiple threads that share this input

Resources of the process.

38. What is the difference between heap and stack?

For:

Stack: Automatically allocated and freed by the compiler. The variables defined in the function body are usually on the stack.

Heap: Typically freed by programmer allocations. Allocating memory functions such as new, malloc, and so on are

On The heap in C # is the managed heap, and the GC is responsible for management.

What is the role of C # static? Should all methods be declared Static?

For:

A) The object method, or declared as static member, indicates that this member is not an instance of the object, but

For the entire class, we can directly call the method directly through class.

b) Static members should not be stored in memory static storage, access speed is fast, but the capacity is limited.

How many page-passing methods are there in Web form for ASP. What are the pros and cons?

Session, Viewstate, URL, etc.

What are the major improvements in the ASP. NET Web Form compared to ASPs?

For:

A) ASP belongs to Microsoft early-riser programming technology, the page code embeds script VbScript, which interprets the type of execution. Already

have been eliminated. There are many security issues and inefficient implementation. Similar to JSP.

b) the ASP. NET Web Form belongs to the new Web development framework, based on the platform. Compile-time, performance improvement,

Higher security, more conducive to the development, debugging work efficiency. Provides a rich library of controls, support events

Programming model.

What is ASP. NET MVC?

ASP. NET MVC is the new Web development framework that Microsoft has launched to support the MVC architecture model. Support points of concern

Separation to better support team development and Support Unit testing. Give programmers a deeper understanding of the nature of Web development.

It has been released to the latest version of MVC6.0.

There are several versions of ASP. NET MVC, which version is more stable? which integration into the. NET framework?

mvc1.0-6.0,6 version of MVC.

What are the biggest new features of the. asp. NET MVC6?

How many page-value methods does ASP. NET MVC have?

What is Bootstrap? How to use?

Bootstrap is an open source toolkit for front-end development launched by Twitter. It was made by Twitter's designers

Mark Otto and Jacob Thornton co-developed, is a css/html framework. Free, open source, use up

To be very simple. It is very popular at present. The ASP. NET MVC version 5.0 is integrated directly into the template.

What is the difference between ASP. NET WebForm and MVC? What are their strengths and weaknesses?

a) ASP. NET Web Form Web site development Framework, based on the platform. compiler, performance improvement, security

Higher, more conducive to improve the development, commissioning work efficiency. Provides a rich library of controls, support for event programming

Type.

b) ASP. NET MVC belongs to the new Microsoft Web Development framework, open source.

c) Support the MVC architecture pattern, which is a good way to achieve separation of duties. Better support for unit testing, and team collaboration

Development work!

D) MVC differs from layer three architecture, routing, caching, security verification, etc.

What is Web API? What is the relationship to REST WCF?

What is the. asp. NET Identity?

The ASP. NET identity is a new, easier-to-use, secure authentication box from Microsoft that replaces

Before the ASP. NET membership component. It supports the latest Oath, compatible with OWIN components, and Visual

STUDIO2013 is released together.

50. What is SOA? What is a Web service? What is the difference from the Web API?

SOA, also known as service-oriented architecture, serves as the core to realize the integrated interaction of distributed systems. Maximum

Leverage existing resources. WCF is Microsoft's new distributed development framework that supports the latest standards for WEB services

Web API, also known as the Web interface, Microsoft launches

The ASP. NET Web API is a restful development framework that is simple and convenient.

51. What are the new features of Microsoft Next generation. NET VNext? What do you expect more?

52. How to achieve cross-platform distributed system security authentication and data encryption?

53. How to ensure the security of the website system? What are the advantages and disadvantages of cryptographic algorithms? What are the measures?

54. How to realize the distributed architecture of high-and-power generator website?

55. How do I support millions of users while online NoSQL is? How does MongoDB do distributed clustering?

56. How to achieve SSO Single sign-on, cross-platform docking QQ or Weibo account?

57. How can I optimize the query for tens of millions of databases?

58. How to achieve fast access to hundreds of millions of large-scale data?

. NET Classic Face Questions

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.