我是靠谱客的博主 落后未来,最近开发中收集的这篇文章主要介绍.net面试题,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Dot.NET/C#/VB.NET/ASP.NET 英文面试题(附答案)

 

2007-7-28 6:38:43内容摘要:In a Webservice, need to display 10 rows from a table. So DataReader or DataSet is best choice?WebService will support only DataSet.
关键词:c#面试题  asp.net面试题  vb.net面试题  IT专业英语面试题 
本文地址:http://www.teecool.com/post/2007072802.html
内容正文:
1. Does C# support multiple inheritance?
 
No, use interfaces instead

2. What’s the implicit name of the parameter that gets passed into the class’ set method?
 


Value, and its datatype depends on whatever variable we’re changing

3. What’s the top .NET class that everything is derived from?
 


System.Object.

4. How’s method overriding different from overloading?
 


When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.

5. What is CLR?
The .NET Framework provides a runtime environment called the Common Language Runtime or CLR (similar to the Java Virtual Machine or JVM in Java), which handles the execution of code and provides useful services for the implementation of the program. CLR takes care of code management at program execution and provides various beneficial services such as memory management, thread management, security management, code verification, compilation, and other system services. The managed code that targets CLR benefits from useful features such as cross-language integration, cross-language exception handling, versioning, enhanced security, deployment support, and debugging.

6. What is CTS?
 Common Type System (CTS) describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety, and high performance code execution.

7. What is CLS?
 The CLS is simply a specification that defines the rules to support language integration in such a way that programs written in any language, yet can interoperate with one another, taking full advantage of inheritance, polymorphism, exceptions, and other features. These rules and the specification are documented in the ECMA proposed standard document, "Partition I Architecture", http://msdn.microsoft.com/net/ecma

8. What is strong name?
 


A name that consists of an assembly's identity—its simple text name, version number, and culture information (if provided)—strengthened by a public key and a digital signature generated over the assembly.

9. What is Application Domain?
 The primary purpose of the AppDomain is to isolate an application from other applications. Win32 processes provide isolation by having distinct memory address spaces. This is effective, but it is expensive and doesn't scale well. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory. Objects in different application domains communicate either by transporting copies of objects across application domain boundaries, or by using a proxy to exchange messages.

10. What is serialization in .NET? What are the ways to control serialization?
Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Serialization/Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).Serialization can be defined as the process of storing the state of an object to a storage medium. During this process, the public and private fields of the object and the name of the class, including the assembly containing the class, are converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created. Binary serialization preserves type fidelity, which is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the clipboard. You can serialize an object to a stream, disk, memory, over the network, and so forth. Remoting uses serialization to pass objects "by value" from one computer or application domain to another. XML serialization serializes only public properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard, it is an attractive choice for sharing data across the Web. SOAP is an open standard, which makes it an attractive choice. There are two separate mechanisms provided by the .NET class library - XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code.

11. What are Satellite Assemblies?
 


Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated with a given language and .NET Framework version. No core .NET Framework files are removed unless the last language for that .NET Framework version is being removed.

12. What is Global Assembly Cache (GAC) and what is the purpose of it?
 Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.  You should share assemblies by installing them into the global assembly cache only when you need to.

13. What is Reflection in .NET?
 All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly.

14. What is the managed and unmanaged code in .net?
 


The .NET Framework provides a run-time environment called the Common Language Runtime, which manages the execution of code and provides services that make the development process easier. Compilers and tools expose the runtime's functionality and enable you to write code that benefits from this managed execution environment. Code that you develop with a language compiler that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling, enhanced security, versioning and deployment support, a simplified model for component interaction, and debugging and profiling services

15. What are Namespaces?
 


The namespace keyword is used to declare a scope. This namespace scope lets you organize code and gives you a way to create globally-unique types. Even if you do not explicitly declare one, a default namespace is created. This unnamed namespace, sometimes called the global namespace, is present in every file. Any identifier in the global namespace is available for use in a named namespace. Namespaces implicitly have public access and this is not modifiable.

16. What are the access-specifiers available in c#?
 


Private, Protected, Public, Internal, Protected Internal.

17. Advantage of ADO.Net?
 


    * ADO.NET Does Not Depend On Continuously Live Connections
    * Database Interactions Are Performed Using Data Commands
    * Data Can Be Cached in Datasets
    * Datasets Are Independent of Data Sources
    * Data Is Persisted as XML
    * Schemas Define Data Structures

 

18. Difference between OLEDB Provider and SqlClient ?
 


SQLClient .NET classes are highly optimized for the .net / sqlserver combination and achieve optimal results. The SqlClient data provider is fast. It's faster than the Oracle provider, and faster than accessing database via the OleDb layer. It's faster because it accesses the native library (which automatically gives you better performance), and it was written with lots of help from the SQL Server team.

19. Differences between dataset.clone and dataset.copy?
 


Clone - Copies the structure of the DataSet, including all DataTable schemas, relations, and constraints.Does not copy any data
Copy - Copies both the structure and data for this DataSet.

20. In a Webservice, need to display 10 rows from a table. So DataReader or DataSet is best choice?
 


WebService will support only DataSet.

21. What is Remoting?
 


The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.

22. What’s the difference between System.String and System.StringBuilder classes?
 


System.String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

23. What’s a delegate?
 


A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.

24. What’s an interface class?
 


It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes

25. What is the transport protocol you use to call a Web service

最后

以上就是落后未来为你收集整理的.net面试题的全部内容,希望文章能够帮你解决.net面试题所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部