Você está na página 1de 13

DOTNET QUESTIONS

1. What is CLR, CLS,CTS.........................................................................................................2


2. What is CLR? 2.1. Diff between CLR & CTS .........................................................................2
More references: .........................................................................................................................2
3. Which namespace is the base class for .net Class library ......................................................2
4. What is Assembly? ...............................................................................................................3
5. What is a strong name? ........................................................................................................3
6. Where does the dispose method lie and how can it be used to clean up resources................3
7. Which version of the Common Language Runtime (CLR) does the .NET Framework 3.0 use?
3
8. What is view state .................................................................................................................3
9. what is the difference between overloading & overriding........................................................4
10. What is the difference between DataList and Repeater data binding controls?.......................5
11. What is the Difference between a sub and a function ............................................................5
12. What is difference between Value types and Reference types in VB.NET or C# (Value types
VS Reference types) ...................................................................................................................5
13. Is string a value type or a reference type? .............................................................................5
14. Explain the Difference between value and reference type......................................................5
15. What is the purpose of connection pooling in ADO.NET? ......................................................6
16. What is the difference between classes and structs in Microsoft.Net?....................................6
17. Differences between Interface and Abstract class..................................................................7
18. What is the basic functionality of Garbage Collector in Microsft.Net? .....................................8
19. What is a static class?...........................................................................................................8
20. What is static member of class? ............................................................................................9
21. what is the use of web.config in asp.net .............................................................................. 10
22. What is difference between class and interface in C# and another object oriented
programming languages............................................................................................................ 10
23. How to manage state in Asp.Net Web applications?............................................................ 10
24. How many types of cookies are there in .NET ? .................................................................. 11
25. What is the difference between Server.Transfer and Response.Redirect? Why you choose
one over the other in ASP.NET web application?....................................................................... 11
26. Does .NET CLR and SQL SERVER run in different process? .............................................. 12
27. What is LINQ? .................................................................................................................... 12
28. Difference between Microsoft.net Framework 2.0 and 3.5.................................................... 12
29. What are the situations you will use a Web Service and .Net Remoting in your projects?..... 12
30. Global Assembly Cache (GAC) ........................................................................................... 13
31. In Multi tier .Net Application how you can pass data between different tiers ......................... 13
32. Difference between VB.NET and C#. Which is faster........................................................... 13
33. Readonly vs. const variables?............................................................................................. 13
34. What application do you use to install a Windows service.................................................... 13
1. What is CLR, CLS,CTS

Common Language Runtime [CLR]:


• Is a runtime environment that manages the execution of .Net code and provide services
like memory management, debugging, security, etc.
• The execution engine for .NET framework applications.
• also known as Virtual Execution System(VES)
• CTS, CLS are the components of the CLR.

Commom Type System [CTS]. This is the range of types that .NET runtime (CLR) understands.
Commom Language Specification [CLS]. This is the subset of CTS, which all .NET languages
must support.

• CLR-Common Language Runtime.In which programs return in C# and other .Net platform
or .net languages.It also supports cross language inter operability.
• CTS-Common Type Specification,.Net provides multiple language support using the
feature is known as commmon type system.
• CLS-Common Language Specification.It defines a set of rules that enables
interoperability on the .net platform party compiler designer and library builders.

Another Answer:

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.

The Common Language Runtime is the underpinning of the .NET Framework. 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.

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.

The Common Language Specification (CLS) is an agreement among language designers


and class library designers to use a common subset of basic language features that all
languages have to follow.

2. What is CLR? 2.1. Diff between CLR & CTS

CLR is the Common Language Runtime for the dotnet frame work.
CTS is the Common Type Sytem for all languages.It consists of the types(Class Enums Structs
Interfaces etc for any language)

CLR is run time execution environment for .Net It provides runtime as well as compile time
services. e.g Memory Management debuging CLR works with the CLS (Common Language
Specification) and CTS (Common Type Systems) to ensure language interoperability.

CTS is one of the component of CLR.


More references: http://www.geekinterview.com/question_details/15811

3. Which namespace is the base class for .net Class library


System.Object
4. What is Assembly?
Assembly is unit of deployment like .exe,.dll. In case of assembly all information of assembly is
stored in manifest.this give information like version number,scope of variable etc. we can see it
using ILDASM .

Types of assembly

• Public /Shared Assembly


• Private Assembly
• Dynamic/static Assembly
• Satellite Assembly

5. What is a strong name?


A shared Assembly(Public) is one that is used by multiple applications. A shared Assembly must
have a name that is globally unique. .Net framework creates this unique name through a
technique called STRONG NAMES.

A combination of Assembly name(the name of your assembly ie .dll) + version number + culture
locale + public key token(a 16digit number) makes up a strong name.

Advantages of creating a strong name is :

• Two dll with same name can be installed on the same machine(as strong names would
be different)
• Different versions can be worked on the same side by side

When ever we want our assembly to be used globally through out the application.Then we have
to keep our assembly in global assembly cache.when ever we kept our assembly in global
assembly cache we have to provide strong name for that assembly

For private assemblies their is no need to create strong name because it is stored in the
application folder

6. Where does the dispose method lie and how can it be used to clean up resources

dispose method is in IDisposable interface,when you are writing any class in .Net u should inherit
the IDisposable interface and u should implement the Dipoase method.in dispose method u can
call teh GC.Collect() to free up the object.along with u can aslo call GC.SuppressFinalize() to
avoid multiple callings of GC.

7. Which version of the Common Language Runtime (CLR) does the .NET Framework
3.0 use?
The .NET Framework 3.0 uses the 2.0 version of the CLR. With this release, the overall
developer platform version has been decoupled from the core CLR engine version. We expect
the lower level components of the .NET Framework such as the engine to change less than
higher level APIs, and this decoupling helps retain customers’ investments in the technology.

8. What is view state


When a form is submitted in classic ASP, all form values are cleared. Suppose you have
submitted a form with a lot of information and the server comes back with an error. You
will have to go back to the form and correct the information. You click the back button, and what
happens.......ALL form values are CLEARED, and you will have to start all over again! The site
did not maintain your ViewState.

When a form is submitted in ASP .NET, the form reappears in the browser window together with
all form values. How come? This is because ASP .NET maintains your ViewState. The
ViewState indicates the status of the page when submitted to the server. The status is defined
through a hidden field placed on each page with a <form runat="server"> control.
Maintaining the ViewState is the default setting for ASP.NET Web Forms. If you want to NOT
maintain the ViewState, include the directive <%@ Page EnableViewState="false" %> at the top
of an .aspx page or add the attribute EnableViewState="false" to any control.

More references: http://allinterview.com/showanswers/4817.html

9. what is the difference between overloading & overriding


OverLoading means one name many forms .its functionallty changes corresponding to the
objects Overriding means its funcationality can be overrided.these can be done by using by using
two keywords
1.overrideable
2.overrides
Overriding take place with in the in_heritance. It is not possible with in the class.

OverLoading is different from Overriding

Overloading comes when you define two methods or morethan two methods with the same name
in the same class with different signature.

Overriding comes when you redefine a method that has already been defined in a parent class
with their same signature.

Overloading is resolved at compile time. Overriding is resolved at runtime.

Overloading..
1.Same name but there are different definitions and parameters..
2.Here, the definitions are extented.
3.Seperate methods share the same name.
4.It is mainly for operators.
5.It must have different method signatures.

Overriding.
1.Here replacement of methods.
2.It is used in inheritance.
3.subclass methods replaces the superclass.
4.It is mainly for functions.
5.It must have same signature

overriding->
1) method should be public.
2)it need inheritance.
3)it need virtual keyword before it declartion.
4)it have same name with same parameter in diffrent class.
5)it require non-static method.
6)method should have same datatype.
Overloading->
1)method can be different access speicifier.
2)it doesn't need inheritacne.
3)all method should be in same class.
4)method can have diffrent datatypes

http://www.allinterview.com/showanswers/241.html
http://wiki.answers.com/Q/Difference_between_overriding_and_overloading
http://en.allexperts.com/q/C-1040/Difference-Overriding-Overloading.htm
http://answers.yahoo.com/question/index?qid=20060924201736AA1Qs5C
http://www.allinterview.com/showanswers/11353.html
10. What is the difference between DataList and Repeater data binding controls?

Answer: The DataList control is similar to the Repeater control. However, it has some additional
properties and templates that you can use to display its data in a diverse fashion. The Repeater
control does not have any built-in layout or style. We are forced to specify all formatting-related
HTML elements and style tags. On the other hand, a DataList control provides more flexibility to
display data in a desired layout. It also provides data selection and editing capabilities. How does
it do it? Well, in addition to the five templates (Item Template, AlternatingItem Template,
Separator Template, Header Template, Footer Template that a repeater has, the DataList control
has two more templates: SelectedItemTemplate, and EditItemTemplate. These templates are
useful for allowing data selection and data editing functionalities.

Furthermore, the RepeatDirection and RepeatColumns properties of a DataList control can be


exploited to lay out the data in horizontal or vertical fashions.

11. What is the Difference between a sub and a function

Function always returns a value but sub does not.

Sub keyword is used for the procedures and procedures never return a value where function key
word is used for function and function returns a value that can be assign to any variable.

Sub is also function but never return the value and Function must return the value.
Function is user defined and System define but sub is keywords that defined by user.

Function can be macro but Sub is Not.

12. What is difference between Value types and Reference types in VB.NET or C# (Value
types VS Reference types)

C# provides two types—class and struct, class is a reference type while the other is a value type.
Here is difference between Value types and Reference types.

Value types directly contain their data which are either allocated on the stack or allocated in-line
in a structure. Reference types store a reference to the value's memory address, and are
allocated on the heap. With reference types, an object is created in memory, and then handled
through a separate reference—rather like a pointer.

Reference types can be self-describing types, pointer types, or interface types. Primitive types
such as int, float, bool and char are value types.

Variables that are value types each have their own copy of the data, and therefore operations on
one variable do not affect other variables. Variables that are reference types can refer to the
same object; therefore, operations on one variable can affect the same object referred to by
another variable.

Value types have a default implied constructor that initializes the default value. Reference types
default to a null reference in memory.

Value types derive from System.ValueType. Reference types derive from System.Object.

Value types cannot derive a new type from an existing value type, except for structs. Reference
types can derive a new type from an existing reference type as well as being able to implement
interfaces.
13. Is string a value type or a reference type?

String is a reference type data type

14. Explain the Difference between value and reference type

Both value type and reference type have one common thing - both derived from system.object
Reference types Value types
stored on the run-time heap stored directly on the stack, either within
an array or within another type
They may only be accessed through a reference Value types are always accessed directly; it
to that storage. This allows the garbage is not possible to create a reference
collector to track outstanding references to a to a value type
particular instance and free the instance
when no references remain
A null reference refers to nothing; it is invalid to Unlike reference types, the value of a
do anything with a null reference except assign value type cannot be a null reference, nor
it can it reference
an object of a more derived type

Reference types are stored on the run-time heap; they may only be accessed through a reference
to that storage. This allows the garbage collector to track outstanding references to a particular
instance and free the instance.when no references remain. A variable of reference type always
contains a reference to a value of that type or a null reference. A null reference refers to nothing;
it is invalid to do anything with a null reference except assign it. Assignment to a variable of a
reference type creates a copy of the reference, not a copy of the value being referenced.

Value types are stored directly on the stack, either within an array or within another type. When
the location containing a value type instance is destroyed, the value type instance is also
destroyed. Value types are always accessed directly; it is not possible to create a reference
to a value type. Prohibiting such a reference makes it impossible to refer to a value class instance
that has been destroyed. A variable of a value type always contains a value of that type. Unlike
reference types, the value of a value type cannot be a null reference, nor can it reference an
object of a more derived type. Assignment to a variable of a value type creates a copy of the
value being assigned.

15. What is the purpose of connection pooling in ADO.NET?

Connection pooling enables an application to use a connection from a pool of connections that do
not need to be re-established for each use. Once a connection has been created and placed in a
connection pool, an application can reuse that connection without performing the complete
connection creation process.

By default, the connection pool is created when the first connection with a unique connection
string connects to the database. The pool is populated with connections up to the minimum pool
size. Additional connections can be added until the pool reaches the maximum pool size.

When a user request a connection, it is returned from the pool rather than establishing new
connection and, when a user releases a connection, it is returned to the pool rather than being
released. But be sure than your connections use the same connection string each time. Here is
the Syntax

conn.ConnectionString = "integrated Security=SSPI; SERVER=192.168.0.123;


DATABASE=MY_DB; Min Pool Size=4;Max Pool Size=40;Connect Timeout=14;";

16. What is the difference between classes and structs in Microsoft.Net?

STRUCTS CLASSES
A struct is a value type A class is a reference type
When struct gets initiated, it gets memory on the When we instantiate a class, memory will be
stack. allocated on the heap
Structs cannot have constructors / Destructors Classes can have explicit parameter less
constructors
There is no inheritance for structs. A struct Classes support inheritance. {OOPs Concept}
cannot inherit from another struct or class, and it
cannot be the base of a class.

Like classes, structures can implement


interfaces.
we cannot assign null to a struct variable, since We can assign null variable to class
structs are value type

17. Differences between Interface and Abstract class


Additional Answer

An abstract class is a special kind of class that cannot be instantiated. So the question is why we
need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited
from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The
advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind
of contract that forces all the subclasses to carry on the same hierarchies or standards.

An interface is not a class. It is an entity that is defined by the word Interface. An interface has no
implementation; it only has the signature or in other words, just the definition of the methods
without the body. As one of the similarities to Abstract class, it is a contract that is used to define
hierarchies for all subclasses or it defines specific set of methods and their arguments. The main
difference between them is that a class can implement more than one interface but can only
inherit from one abstract class. Since C# doesn’t support multiple inheritance, interfaces are used
to implement multiple inheritance

When we create an interface, we are basically creating a set of methods without any
implementation that must be overridden by the implemented classes. The advantage is that it
provides a way for a class to be a part of two classes: one inheritance hierarchy and one from the
interface.
When we create an abstract class, we are creating a base class that might have one or more
completed methods but at least one or more methods are left uncompleted and declared abstract.
If all the methods of an abstract class are uncompleted then it is the same as an interface but with
the restriction that it cannot make a class inherit from it. The purpose of an abstract class is to
provide a base class definition for how a set of derived classes will work and then allow the
programmers to fill the implementation in the derived classes.

There are some similarities and differences between an interface and an abstract class that I
have arranged in a table for easier comparison. Look at in above table.
http://www.dotnetspider.com/resources/1169-Abstract-Class-Vs-Interface-Difference.aspx
http://dotnet-question-answer.blogspot.com/2007/01/what-is-difference-between-abstract.html
http://www.allinterview.com/showanswers/28912.html

18. What is the basic functionality of Garbage Collector in Microsft.Net?

The Common Language Runtime (CLR) requires that you create objects in the managed heap,
but you do not have to bother with cleaning up the memory once the object goes out of the scope
or is no longer needed. The Microsoft .NET Framework Garbage Collector provides memory
management capabilities for managed resources. The Garbage Collector frees objects that are
not referenced and reclaims their memory. You should set your references to Nothing(null) as
soon as you are done with them to ensure your objects are eligible for collection as soon as
possible.
Here are the lists of some tasks performed by the Garbage collector:

 Garbage collector reserves a piece of memory as the application starts for the managed heap.
 Garbage collector controls the managed heap memory currently used and available to an
application.
 Garbage collector allocates memory for new objects within the application.
 The Garbage Collector attempts to reclaim the memory of objects that are not referenced.

19. What is a static class?

We can declare a static class. We use static class when there is no data or behavior in the class
that depends on object identity. A static class can have only static members. We can not create
instances of a static class using the new keyword. .NET Framework common language runtime
(CLR) loads Static classes automatically when the program or namespace containing the class is
loaded.
Here are some more features of static class
• Static classes only contain static members.
• Static classes can not be instantiated. They cannot contain Instance Constructors
• Static classes are sealed.

C# 2.0 now supports static classes. Here are static classes properties.
• A static class cannot be instantiated. That means you cannot create an instance of a
static class using new operator.
• A static class is a sealed class. That means you cannot inherit any class from a static
class.
• A static class can have static members only. Having non-static member will generate a
compiler error.
• A static class is less resource consuming and faster to compile and execute.

Below is the example


Public static class MyStaticClass
{
Private static int myStaticVariable;
Public static int StaticVariable;
{
Get
{
return myStaticVariable;
}
Set
{
myStaticVariable = value;
}
}
Public static void Function() { }
}
When to use static class

We use static class when we have to separate data and behavior that will be independent of any
object identity. The data and functions do not change regardless of what happens to the object.

A static class can only contain static members. We cannot create an instance of a static class.
Static class is always sealed and they cannot contain instance constructor. Hence we can also
say that creating a static class is nearly same as creating a class with only static members and a
private constructor (private constructor prevents the class from being instantiated).

The advantage of using the static class is that compiler can check that no instance of the class is
accidentally added. The complier will not allow any instance class of a static class. We also
cannot inherit a static class since it is sealed. Static class do not have constructor, but can still
declare static constructor to set up the initial values.

Static class also makes the implementation simpler and faster since we do not have make and
instance of the class to call its method. An example of good use of static class would be a class
like math, which does all the mathematic function, or a currency converter class to convert
currency class for converting the currency.

20. What is static member of class?

A static member belongs to the class rather than to the instances of the class. In C# data fields,
member functions, properties and events can be declared static. When any instances of the class
are created, they cannot be used to access the static member.
To access a static class member, use the name of the class instead of an instance variable
Static methods and Static properties can only access static fields and static events.
Like: int i = Car.GetWheels;
Here Car is class name and GetWheels is static property.

Static members are often used to represent data or calculations that do not change in response
to object state.

21. what is the use of web.config in asp.net

Web.config file in ASP.NET, as it sounds like is a configuration file for the Asp .net web
application. An Asp .net application has one web.config file which keeps the configurations
required for the corresponding application. Web.config file is written in XML with specific tags
having specific meanings.

Generally we store database connections, Session States, Error Handling, Security


configurations in ASP.NET web.Config file.

Multiple configuration files, all named Web.config, can appear in multiple directories on an
ASP.NET Web application server. Each Web.config file applies configuration settings to its own
directory and all child directories below it. Configuration files in child directories can supply
configuration information in addition to that inherited from parent directories, and the child
directory configuration settings can override or modify settings defined in parent directories. The
root configuration file named
systemroot\Microsoft.NET\Framework\versionNumber\CONFIG\Machine.config provides
ASP.NET configuration settings for the entire Web server.

• Web.Config file is a configuration files in ASP.Net.


• By Default only one file you can see in a project but you can add multiple config file.
• Basically Web.config file is a XML format.
• You can keep you connection,Session,Keys,Security in a web.config file.
• You can also handle a error from config file also.

22. What is difference between class and interface in C# and another object oriented
programming languages

A class can contain declarations of the following members:


Constructors, Destructors, Constants, Fields, Methods, Properties,Indexers, Operators,
Events, Delegates, Classes, Interfaces, Structs

An interface contains only the signatures of methods, delegates or events. The implementation of
the methods is done in the class that implements the interface. A class that implements an
interface can explicitly implement members of that interface. An explicitly implemented member
cannot be accessed through a class instance, but only through an instance of the interface.

An interface can inherit from one or more base interfaces. When a base type list contains a base
class and interfaces, the base class must come first in the list.

23. How to manage state in Asp.Net Web applications?

State management is done at client side and server side


Client Side: Client Side it can achieved with the help of View state, Cookies, Query
String,hidden fields and control state.
Server Side: with the help of Cache, Application,Session and Database.

Question: what is Viewstate?


Answer: View state is used by the ASP.NET page framework to automatically save the values of
the page and of each control just prior to rendering to the page. When the page is posted, one of
the first tasks performed by page processing is to restore view state.
State management is the process by which you maintain state and page information over multiple
requests for the same or different pages.

Client-side options are:

* The ViewState property * Query strings * Hidden fields * Cookies

Server-side options are:

* Application state * Session state * DataBase

Use the View State property to save data in a hidden field on a page. Because ViewState stores
data on the page, it is limited to items that can be serialized. If you want to store more complex
items in View State, you must convert the items to and from a string.
ASP.NET provides the following ways to retain variables between requests:
Context.Handler object Use this object to retrieve public members of one Web form’s class from
a subsequently displayed Web form.
Query strings Use these strings to pass information between requests and responses as part of
the Web address. Query strings are visible to the user, so they should not contain secure
information such as passwords.
Cookies Use cookies to store small amounts of information on a client. Clients might refuse
cookies, so your code has to anticipate that possibility.
View state ASP.NET stores items added to a page’s ViewState property as hidden fields on the
page.
Session state Use Session state variables to store items that you want keep local to the current
session (single user).
Application state Use Application state variables to store items that you want be available to all
users of the application.

24. How many types of cookies are there in .NET ?


Answer: Two type of cookies.
a) single valued eg request.cookies(”UserName”).value=”dotnetquestion”
b)Multivalued cookies. These are used in the way collections are used example
request.cookies(”CookiName”)(”UserName”)=”dotnetquestionMahesh”
request.cookies(”CookiName”)(”UserID”)=”interview″

25. What is the difference between Server.Transfer and Response.Redirect? Why you
choose one over the other in ASP.NET web application?

Server.Transfer transfers page processing from one page directly to the next page without
making a round-trip back to the client's browser. This provides a faster response with a little less
overhead on the server. Server.Transfer does not update the clients url history list or current url.

Response.Redirect is used to redirect the user's browser to another page or site. This performas
a trip back to the client where the client's browser is redirected to the new page. The user's
browser history list is updated to reflect the new address.
In simple words
Server.Transfer: It moves from one page to another page without making a round trip
While
Response.Redirect:It move from one page to another page with making a round trip to
the browser

In Addition to the above using server.Transfer required a virtual Path that means you can transfer
the server control to the page within the application and not outside application/site.

try out
Response.Redirect(''http://www.google.com");
// this will work since it is new request to the browser
Server.Transfer(''http://www.google.com");
// this wont work "A virtual path is expected." error displayed

we can say that in Server.Transfer("URL") we can pass only that path name which is exist in the
current website.where as Response.Redirect("URL") take any url address they may be in current
website on not .

26. Does .NET CLR and SQL SERVER run in different process?
Dot Net CLR and all .net related application and Sql Server run in same process or we can say
that that on the same address because there is no issue of speed because if these two process
are run in different process then there may be a speed issue created one process goes fast and
other slow may create the problem.

27. What is LINQ?

LINQ stands for language-integrated query with that query becomes an integrated feature of the
developer's primary programming languages (for example, Visual C#, Visual Basic).

Language-integrated query allows query expressions to benefit from the rich metadata, compile-
time syntax checking, static typing and IntelliSense that was previously available only to
imperative code. Language-integrated query also allows a single general purpose declarative
query facility to be applied to all in-memory information, not just information from external
sources.

28. Difference between Microsoft.net Framework 2.0 and 3.5

.NET Framework 3.0 is somewhat different from the 1.x and 2.0 .NET Framework. The first two
.Net frameworks focused on allowing many different languages to communicate with a common
set of libraries translated through the Common Language Runtime (CLR). Introduced with .NET
1.1 and enhanced with .NET 2.0, the CLR works on a relatively simple concept: A common
runtime model executes code for any system running the .NET Framework. What this means to
you as a developer is that you don’t need to keep relearning languages for different technologies.
For instance, a C# developer who writes Windows Forms applications take the knowledge used
for building forms and apply it to writing web pages. Similarly, a Visual Basic .NET developer can
switch from writing mobile applications to writing web services. The CLR acts as an arbitrator and
communicates back and forth.

The .NET 3.0 Framework is not improving upon existing technologies but rather introducing four
new foundation technologies:

Windows Presentation Foundation (WPF)


Windows Communication Foundation (WCF)
Windows Workflow Foundation (WWF)
Windows CardSpace (WCS)
Each of these technologies is a new cornerstone that developers can leverage for new solutions.

Now .Net Framework 3.5 has been released

29. What are the situations you will use a Web Service and .Net Remoting in your
projects?

Well Web services uses .Net remoting concepts internally. But the major difference between web
service and .net remoting is that “web service” can be consumed by clients who are not .NET
platform. While remoting you need the client to be .NET compliant.
Regarding the speed issue ".net Remoting" is faster than “Web Services”. So I think when
deciding the architecture side of choosing between “Web services” and “.NET Remoting” keep
the cross platform issue and the speed issue in mind.

30. Global Assembly Cache (GAC)

31. In Multi tier .Net Application how you can pass data between different tiers
There are many ways you can pass data between tiers :-

Dataset:- The most preferred one as they maintain data in XML format.
Datareader, Custom classes., XML etc.

The answer depends on whether the tiers are distributed onto different machines. If so, you
should serialize your objects via XML (DataSets will do this automatically, but DataSets are a
poor choice because they are so large and inefficient).

If you are not distributing your tiers, then using custom classes or DataSets can work. Custom
classes are the preferred approach if you are doing anything more than a simple CRUD app

32. Difference between VB.NET and C#. Which is faster


VB.NET
• no unsigned int
• Loosely typed language
• no operator overloading
• no pointers
• no auto XML documentation
• no automatic memory management

C#.net

• supports unsigned int


• strongly typed language
• supports operator overloading
• supports pointers
• supports auto XML documentation
• supports automatic memory Management

More references: http://allinterview.com/showanswers/20589.html

33. Readonly vs. const variables?


Both are used for constant values but in readonly variable we can assign the value thru
expression but we can't assign value to constant variable thru expression.

34. What application do you use to install a Windows service


installutil.exe

Você também pode gostar