. Net interview questions-component developers & xml developers

Source: Internet
Author: User

C # component developer

    1. when to use override? When to use new? What is shadowing?

      override is used to rewrite the parent class method to realize polymorphism. When you want to block the parent class members, new is used. shadowing is basically a problem in the difference between new and override, I personally think that there is no need to specifically consider shadowing to clarify override and new.

    2. what are the differences between virtual, sealed, override, and abstract?

      virtual is the keyword for declaring a virtual method, indicating that the method can be overwritten. Sealed indicates that the class cannot be inherited. Override overrides the base class method, abstract indicates that a class is an abstract class or a method is an abstract method. An abstract method does not provide an implementation. A subclass overrides the method implementation of this abstract method. An abstract class cannot be instantiated.

      1. Foo. bar, version = 2.0.205.0, culture = neutral, publickeytoken = 593777ae2d274679d explain the importance and role of each part of the string

        Program Set Name, version (main version, secondary version, internal version, revision number), and Culture) for example, ZH-CN and Public Key (scaling Code) are signs of a strongly-known assembly.

  1. Explains the differences between public, protected, private, and internal.

    Public can be accessed inside or outside the class. Protected can only be accessed inside itself or its subclass, and private can only be accessed inside it, internal can only be accessed in the same assembly.

    1. What are the benefits of using primary InterOP assembly (PIA?

      Pia is officially released and has been signed and can be shared in different programs. Pia may be easier to use than InterOP DLL generated by tlbimp after some changes, such as providing some encapsulated functions.

  2. What mechanisms does nunit use to determine which methods to test?

    Reflection: Add [testmethodattribute] to the test method.

  3. catch (exception e) {Throw E;} and catch (exception E) difference between {Throw;}

    throwing an exception object, the other one only throws an exception and does not throw the original exception object

  4. What is the difference between typeof (FOO) and myfoo. GetType?

    Typeof () is an operator whose operands are of type, rather than an instance of a class. The GetType () method is called by a type instance and is used to obtain the object type at runtime.

    1. Public Class C

      {Public C (string a): this (){;};

      Public C (){;}

    }

    What happened in the first constructor? What is the use of this constructor?

    A: The first constructor calls the second constructor. This constructor constructs an example of a C object. It accepts a string type parameter.

  5. Why is this used? Can be used in the static method?

    This indicates that an object is accessed through the current instance and cannot be used in static.

     

    XML developers

    1. What is the role of the XML namespace?

    When an XML document is complex or needs to obtain content from other places, a document may need more than one word, in this way, elements with the same name and different meanings may appear in different words. The namespace can specify which element belongs to which word. It can specify a unique prefix for each word for identification, and then apply the prefix to elements in the XML document.

    2. When will Dom be used? When is it not suitable? Is there a size limit?

    Wait for the experts to give the answers to the comments .. Thank you!

    3. What is the basic configuration of WS-I? Where is it important?

    WS-I is called Web Service interoperability group. WS-I basic Configuration File Specification Version 1.1 is an attempt by many vendors to accelerate the deployment of truly interoperable web services, which eliminates the ambiguity of previous specifications, defines the limits for creating compliant Web Services, and selects a set of web service settings from a large number of possible settings. (From msdn)

    4. Write a small XML document using the default namespace and a valid (prefix) namespace. The two namespaces must have elements.

    <?XML Version="1.0" Encoding="UTF-8"?>

    <Kml Xmlns="Http://www.opengis.net/kml/2.2" Xmlns: Atom="Http://www.w3.org/2005/Atom">

    <Folder>

    <Name>Temporary location</Name>

    </Folder>

    <Atom: Document>

    <Message> </Message>

    </Atom: Document>

    </Kml>

    The last modified kml.

    5. What are the basic differences between elements and features?

    An element is a node in the XML tree structure and must appear in pairs. An attribute is located in an element.

    6. What is the difference between well-formed XML and valid XML?

    A valid XML file is the minimum standard for an XML file. For example, tags must be matched. If the standard is not met, the XML file is not recognized. Valid XML is verified by the DTD or XSD file.

    7. How to verify XML in. Net?

    For more information, see the description on the official Microsoft website. Http://support.microsoft.com/kb/307379/zh-cn

    8. myxmldocument. selectnodes ("// mynode"); why?CodeNot good? When is it okay?

    If you simply select a node named mynode, this approach is inefficient. This statement can only be used to obtain a set of nodes named mynode.

    9. Differences between xmlreader and event reader (SAX)

    Similar to the simple xml api (SAX) reader, xmlreader is a read-only cursor. It provides fast and non-cached stream access to the input. It can read streams or documents. It allows users to extract data and skip records that are meaningless to the application. The big difference is that the sax model is a "push" model where the analyzer pushes events to the application and notifies the application every time it reads a new node, the xmlreader application can extract nodes from the reader at will. (From msdn)

    10. What is the difference between xpathdocument and xmldocument? Under what circumstances should I use?

    The xpathdocument class uses the XPath data model to provide a fast, read-only representation of XML documents in memory. Xmldocument class is an editable representation of XML documents that implement W3C Document Object Model (DOM) Level 1 core and core Dom level 2 in memory. So the difference lies in a read-only.

    11. What are the differences between "XML fragments" and "XML documents "?

    First of all, the more important thing is that the XML document requires "<? XML version = "1.0" encoding = "UTF-8"?> "Such a statement. XML fragments are not mandatory. In addition, it seems that XML can have multiple root nodes (while XML documents can have only one root node)

    12. What is standard XML?

    Explanations similar to those in question 6

    13. What is the difference between the XML infoset specification and the xml dom? What is the problem solved by infoset?

    XML Information Set (infoset) allows you to describe an XML document as a series of objects with specific attributes. Dom indicates only one level. Therefore, infoset is used to better represent objects in XML.

    14. Compare DTD and XSD. What are their similarities and differences? Which one is better? Why?

    In terms of Schema description language, both XML schema and xml dtd belong to the syntax mode. In other words, it is used to verify the XML format. However, the XML schema format is very different from the xml dtd format. XML schema is actually an application of XML, that is to say, the XML schema format is exactly the same as the XML format, as a subset of sgml dtd, xml dtd has a completely different format than XML format. Therefore, XML Schema Based on XML format is more advantageous. (Refer to the IBM Developer Network http://www.ibm.com/developerworks/cn/xml/x-sd/index.html)

    15. Does system. XML support DTD? If yes, how do I use it?

    The URL in the 7th questions explains the problem.

    16. Can XML Schema be represented as an object graph? Can an object chart be expressed as an XML schema?

    Yes. VS is built into this tool.

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.