.NET Framework Interview Questions and Answers (547) - Page 14

In which way you can copy the COM component to the server and register?

These components provides setup program to install or remove them from the system. Suppose the component doesn’t provide a setup program, you can copy it to the server and register it using the MFC RegSvr32.exe utility, as shown below:
RegSvr32 MyComname.dll
Can we create web application with out web.config file?

Yes we can create,
if there is a web.config file it will take settings from directory level web.config file. if there is no web.config file in application level then it will go for machin.config file for setting.

So we can create web application without web.config file
Which is an example of Pascal Casing ?

NOTE: This is objective type question, Please click question title for correct answer.
Which class defines the methods for implementing drawings, shapes, writing strings in a GUI based application?

Graphics class defined by the System.Drawing namespace contains methods
like DrawString, DrawArc, DrawImage, DrawEllipese which are used for implementing
Drawings, shapes, writing strings etc.
Can classes be marked as protected or private ?

Yes, a class can be marked as protected but we have to use the concept of nested classes for that .
For a class can be marked as private we have to use the concept of nested classes for that or declare a class in a structure
example: These are valid examples:
class A
{
protected class B
{
}
}

class C
{
private class D
{
}
}
//Class can also be private inside a structure
struct empz
{
private class Class3
{

}
}

It is OK.

If a class is declared below a namespace it cannot be marked as protected or private.
Do events have a return type?

Yes, events return a delegate.

example: delegate void dd();

event dd myevent;

myevent is the event name and returns the delegate dd;
Which encoding does not allow Chinese or Arabic characters?

NOTE: This is objective type question, Please click question title for correct answer.
What are the differences between an interface and an abstract class.

Both interface and an abstract class cannot be instantiated and are implemented
by inheriting them in other classes.

The differences between them are:

1)Interfaces
a)All members are public by default.
b)They cannot contain fields.
c)No coding of the methods or the properties is allowed.
d)They do not provide implementation.
e)Interfaces support multiple inheritance
f)abstract keyword is not there before the interface or its members names.


Abstract classes
a)All members are private by default. We can put modifiers like
public, protected before the abstract class members.
b)They can contain fields.
c) coding of the methods or the properties is allowed.(nonabstract)
we can also declare abstract methods(methods with no coding) and only
the declaration
d)They can provide implementation. An abstract class can implement an
interface
e)Abstract classes support single inherritance
g)abstract keyword is required before their names and also before the
abstract methods or properties.
Which dll is known as the dll for microsoft .NET runtime ?

NOTE: This is objective type question, Please click question title for correct answer.
What is the difference between casting and boxing?

casting is the technique using which we convert data of one
type to data of another type.
It is like a main category of boxing.

boxing is a sub category of casting which deals with
converting a value type to a reference type.

example:
1) double d=245.66;
//casting: conversion between 2 value types
int a=(int)d;


2) int f=200;

object z=f; //casting as well as boxing: conversion of a value type to a reference type.
Which of these files are in the Config folder of the .net Framework?

NOTE: This is objective type question, Please click question title for correct answer.
Which class is used to represent the Exceptions thrown by the CLR?

NOTE: This is objective type question, Please click question title for correct answer.
Which of these classes is not derived from MemberInfo class?

NOTE: This is objective type question, Please click question title for correct answer.
How you load dynamic assembly? How will create assemblies at run time?

You can load the assembly dynamically by using classes from the System.Reflection namespace.
Assembly x = Assembly.LoadFrom( “Custom.dll” );


You can create assembly by using classes from System.CodeDom.Compiler
What is PInvoke?

Pinvoke (PlatForm Invoke) features of the .NET enables .NET Code to call functions from unmanaged libraries like user32.dll, kernel32.dll. Thse libraries contain Window API functions like FlashWindow, GetComputerName respectively.
FlashWindow can be used to blink the form's caption bar.
GetComputerName can be used to retreive the computer's name.
What is XSL?

XSL stands for Extensible Style Language:

It is basically a formatting language using which we can convert an XML document
into an HTML document. XSL is similar to CSS but specific for XML documents.
XSL has its own set of namespaces and elements using which we can apply the formatting.
Differences between Window and Web Forms

Window Forms:

1)They do not need a web browser or web server to execute.

2)They execute through their respective exe files

3)They run on the same machine they are displayed on.

4)Their single instance exists until we close them or dispose them through coding

5)Used for developing games, inventory management, system utiltites etc.

6)They run under Code Access Security.


Web Forms:

1)They need a web browser as well as a web server(on the server machine only).

2)They execute through the dll of the web application which is then processed by IIS and the .net framework.

3)They run on a remote server and are displayed remotely on the clients.

4)Every time they are submitted, their new instance is created.

5)Used in web site development.

6)They use role based security
Which of these collections can be made as readonly?

NOTE: This is objective type question, Please click question title for correct answer.
What is the difference between .NET 1.1,2.0,3.0,3.5 and 4.0 ?

The list of differences are huge. In interviews you normally need to short and sweet. So we will list down top 5 differences from each section.

So lets first start with the difference between 1.0 and 2.0.

Support for 64 bit application.
Generics
SQL cache dependency
Master pages
Membership and roles

Now the next difference .NET 2.0 and 3.0
=========================================

WCF
WPF
WWF
WCS ( card space)

3.0 and 3.5
==========================================
LINQ
Ajax inbuilt
ADO Entity framework
ADO data services
Multi targeting

Finally 3.5 and 4.0
===========================================
MEF
Parallel computing
DLR dynamic
Code contract
language runtime
Lazy initialization

Thanks
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories