.NET Interview Questions with Answers Page III
From freshersonline.com
1. What is the base class of .NET?
Base class provides a base set of methods that all derived classes can use
2. What is assembly?
It is a single deployable unit that contains all the information abt the implementation of
classes , structures and interfaces
3. What is a Web Service?
A web service is a software component that exposes itself through the open communication
channels of the Internet. Applications running on remote machines, on potentially different
platforms, can access these components in a language and platform-independent manner. A Web Service
is a group of functions, packaged together for use in a common framework throughout a network.
4. Using COM Component in .Net
As most of you know that .Net does not encourage the development of COM components and provides a
different solution to making reusable components through Assemblies. But, there are a lot of COM
components present which our .Net application might need to use. Fortunately, .Net provides an
extremely simple approach to achieve this. This is achieved by using ‘Wrapper Classes’ and ‘Proxy
Components’. .Net wraps the COM component into .Net assembly technically called ‘Runtime Callable
Wrapper’ or RCW. Then u can call and use your COM component just as a .Net (or C#, if u are using C#) Assembly.
5. What are Attributes?
Attributes are declarative tags in code that insert additional metadata into an assembly. There
exist two types of attributes in the .NET Framework: Predefined attributes such as AssemblyVersion,
which already exist and are accessed through the Runtime Classes; and custom attributes, which you
write yourself by extending the System.Attribute class.
6. What is "Common Language Specification" (CLS)?
CLS is the collection of the rules and constraints that every language (that seeks to achieve
.NET compatibility) must follow. It is a subsection of CTS and it specifies how it shares and extends
one another libraries.
7. What is "Common Type System" (CTS)?
CTS defines all of the basic types that can be used in the .NET Framework and the operations performed
on those type.
All this time we have been talking about language interoperability, and .NET Class Framework. None of this
is possible without all the language sharing the same data types. What this means is that an int should mean
the same in VB, VC++, C# and all other .NET compliant languages. This is achieved through introduction of
Common Type System (CTS).
8. What is Reflection?
It extends the benefits of metadata by allowing developers to inspect and use it at runtime. For example,
dynamically determine all the classes contained in a given assembly and invoke their methods. Reflection
provides objects that encapsulate assemblies, modules, and types. You can use reflection to dynamically
create an instance of a type, bind the type to an existing object, or get the type from an existing object.
You can then invoke the type's methods or access its fields and properties. Namespace: System.Reflection
