1. Does C# support multiple inheritance?
No, use interfaces instead
2. What’s the implicit name of the parameter that gets passedinto the class’ set method?
Value, and its datatype depends on whatever variable we’rechanging
3. What’s the top .NET class that everything is derivedfrom?
System.Object.
4. How’s method overriding different from overloading?
When overriding, you change the method behavior for a derivedclass. Overloading simply involves having a method with the samename within the class.
5. What is CLR?
The .NET Framework provides a runtime environment called the CommonLanguage Runtime or CLR (similar to the Java Virtual Machine or JVMin Java), which handles the execution of code and provides usefulservices for the implementation of the program. CLR takes care ofcode management at program execution and provides variousbeneficial services such as memory management, thread management,security management, code verification, compilation, and othersystem services. The managed code that targets CLR benefits fromuseful features such as cross-language integration, cross-languageexception handling, versioning, enhanced security, deploymentsupport, and debugging.
6. What is CTS?
Common Type System (CTS) describes how types are declared, used andmanaged 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 supportlanguage integration in such a way that programs written in anylanguage, yet can interoperate with one another, taking fulladvantage of inheritance, polymorphism, exceptions, and otherfeatures. These rules and the specification are documented in theECMA 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 textname, version number, and culture information (ifprovided)—strengthened by a public key and a digital signaturegenerated over the assembly.
9. What is Application Domain?
The primary purpose of the AppDomain is to isolate an applicationfrom other applications. Win32 processes provide isolation byhaving distinct memory address spaces. This is effective, but it isexpensive and doesn't scale well. The .NET runtime enforcesAppDomain isolation by keeping control over the use of memory - allmemory in the AppDomain is managed by the .NET runtime, so theruntime can ensure that AppDomains do not access each other'smemory. Objects in different application domains communicate eitherby transporting copies of objects across application domainboundaries, or by using a proxy to exchange messages.
10. What is serialization in .NET? What are the ways to controlserialization?
Serialization is the process of converting an object into a streamof bytes. Deserialization is the opposite process of creating anobject from a stream of bytes. Serialization/Deserialization ismostly used to transport objects (e.g. during remoting), or topersist objects (e.g. to a file or database).Serialization can bedefined as the process of storing the state of an object to astorage medium. During this process, the public and private fieldsof the object and the name of the class, including the assemblycontaining the class, are converted to a stream of bytes, which isthen written to a data stream. When the object is subsequentlydeserialized, an exact clone of the original object is created.Binary serialization preserves type fidelity, which is useful forpreserving the state of an object between different invocations ofan application. For example, you can share an object betweendifferent applications by serializing it to the clipboard. You canserialize an object to a stream, disk, memory, over the network,and so forth. Remoting uses serialization to pass objects "byvalue" from one computer or application domain to another. XMLserialization serializes only public properties and fields and doesnot preserve type fidelity. This is useful when you want to provideor consume data without restricting the application that uses thedata. Because XML is an open standard, it is an attractive choicefor sharing data across the Web. SOAP is an open standard, whichmakes it an attractive choice. There are two separate mechanismsprovided by the .NET class library - XmlSerializer andSoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for WebServices, and uses SoapFormatter/BinaryFormatter for remoting. Bothare available for use in your own code.
11. What are Satellite Assemblies?
Satellite assemblies are often used to deploy language-specificresources for an application. These language-specific assemblieswork in side-by-side execution because the application has aseparate product ID for each language and installs satelliteassemblies in a language-specific subdirectory for each language.When uninstalling, the application removes only the satelliteassemblies associated with a given language and .NET Frameworkversion. No core .NET Framework files are removed unless the lastlanguage for that .NET Framework version is being removed.
12. What is Global Assembly Cache (GAC) and what is the purposeof it?
Each computer where the common language runtime is installed has amachine-wide code cache called the global assembly cache. Theglobal assembly cache stores assemblies specifically designated tobe shared by several applications on the computer. You should shareassemblies by installing them into the global assembly cache onlywhen you need to.
13. What is Reflection in .NET?
All .NET compilers produce metadata about the types defined in themodules they produce. This metadata is packaged along with themodule (modules in turn are packaged together in assemblies), andcan be accessed by a mechanism called reflection. TheSystem.Reflection namespace contains classes that can be used tointerrogate 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 theCommon Language Runtime, which manages the execution of code andprovides services that make the development process easier.Compilers and tools expose the runtime's functionality and enableyou to write code that benefits from this managed executionenvironment. Code that you develop with a language compiler thattargets the runtime is called managed code; it benefits fromfeatures such as cross-language integration, cross-languageexception handling, enhanced security, versioning and deploymentsupport, a simplified model for component interaction, anddebugging and profiling services
15. What are Namespaces?
The namespace keyword is used to declare a scope. This namespacescope lets you organize code and gives you a way to createglobally-unique types. Even if you do not explicitly declare one, adefault namespace is created. This unnamed namespace, sometimescalled the global namespace, is present in every file. Anyidentifier in the global namespace is available for use in a namednamespace. Namespaces implicitly have public access and this is notmodifiable.
16. What are the access-specifiers available in c#?
Private, Protected, Public, Internal, Protected Internal.
17. Advantage of ADO.Net?
* ADO.NETDoes Not Depend On Continuously Live Connections
* DatabaseInteractions Are Performed Using Data Commands
* Data CanBe Cached in Datasets
* DatasetsAre Independent of Data Sources
* Data IsPersisted as XML
* SchemasDefine 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 SqlClientdata provider is fast. It's faster than the Oracle provider, andfaster than accessing database via the OleDb layer. It's fasterbecause it accesses the native library (which automatically givesyou better performance), and it was written with lots of help fromthe SQL Server team.
19. Differences between dataset.clone anddataset.copy?
Clone - Copies the structure of the DataSet, including allDataTable schemas, relations, and constraints.Does not copy anydata
Copy - Copies both the structure and data for this DataSet.
20. In a Webservice, need to display 10 rows from a table. SoDataReader or DataSet is best choice?
WebService will support only DataSet.
21. What is Remoting?
The process of communication between different operating systemprocesses, regardless of whether they are on the same computer. The.NET remoting system is an architecture designed to simplifycommunication between objects living in different applicationdomains, whether on the same computer or not, and between differentcontexts, whether in the same application domain or not.
22. What’s the difference between System.String andSystem.StringBuilder classes?
System.String is immutable; System.StringBuilder was designed withthe purpose of having a mutable string where a variety ofoperations can be performed.
23. What’s a delegate?
A delegate object encapsulates a reference to a method. In C++ theywere referred to as function pointers.
24. What’s an interface class?
It’s an abstract class with public abstract methods all of whichmust be implemented in the inherited classes