C # simple interview questions (6)

Source: Internet
Author: User

76. Differences between hashmap and hashtable.
A: hashmap is a lightweight Implementation of hashtable (non-thread-safe implementation). They have completed the map interface. The main difference is that hashmap allows null key values ), because of non-thread security, the efficiency may be higher than that of hashtable.

77. Difference Between and.
& Is a bitwise operator that represents bitwise and operation, & is a logical operator that represents logic and (and ).

78. Write an HTML page to implement the following functions: "Hello" is displayed when you click the page with the left-click button, and "disabled right-click" is displayed when you right-click the page ". The page is automatically closed in 2 minutes.
A: <SCRIPT *** SCRIPT>
SetTimeout ('window. Close (); ', 3000 );
Function show ()
{
If (window. event. Button = 1)
{
Alert ("Left ");
}
Else if (window. event. Button = 2)
{
Alert ("right ");
}
}
</SCRIPT>

79.62-63 = 1 the equation is not true. Please move a number (the minus sign and the equal sign cannot be moved) so that the equation is true. How can we move it?
Answer: 62 is moved to the power 6 of 2.

80. Main differences between XML and HTML
Answer: 1. XML is case-sensitive and HTML is not.
2. In HTML, if the context clearly shows where the paragraph 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.

81. What is soap and what applications are there.

A: 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 object orCodeAnd communicate with each other in any language on any platform. This type of communication uses messages in XML format.

Soap is also called xmlp.ProgramInformation Exchange provides a standard mechanism. 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. 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.

What are common objects in 82.ado.net? Describe them separately.
Answer: Connection database connection Image
Command database commands
Datareader data reader
Dataset

83. List the XML technologies you know and their applications.
A: XML is used for configuration. It is used to save static data types. Web Services... And config are the most exposed to XML, and the SOAP protocol is used.

84. What is XML?
A: The markup language can be expanded using XML. Extensible Markup Language. Tag refers to the information symbols that computers can understand. With this tag, computers can process various types of information.Article. To define these tags, you can select an international markup language, such as HTML, or 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.

85. to process a string, remove the spaces at the beginning and end of the string. If there are consecutive spaces in the string, only one space is reserved, that is, multiple spaces are allowed in the string, however, the number of consecutive spaces cannot exceed one.
A:String inputstr = "xx ";
Inputstr = RegEx. Replace (inputstr. Trim (), @ "\ s + ","");

86. What is the difference between datareader and dataset?
A: One is a read-only cursor and the other is a table in memory.

87. How many requests can be sent to the server?
A: Get and post. Get is generally the link mode, and post is generally the button mode.

88. Please describe several common methods for passing parameters between pages in. NET and describe their advantages and disadvantages.
A: Session (viewstate) is simple but easy to lose.
Application global
Cookies are simple but may not be supported and may be forged.
The URL parameter is simple and displayed in the address bar with a limited length.
The database is stable and secure, but its performance is relatively weak.

89. asp. Net compared with ASP, what are the main advances?
A:ASP interpretation form, aspx compilation type, performance improvement, can be separated from the work of the artist, more conducive to team development.

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

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.