Académique Documents
Professionnel Documents
Culture Documents
Answers :
1. Answers:
1)In a interface class, all methods are abstract without implementation where as in
an abstract class some methods we can define concrete. In interface, no
accessibility modifiers are allowed. An abstract class may have accessibility
modifiers. Interface and abstract class are basically a set of rules which u have to
follow in case u r using them(inheriting them).
1
Microsoft interview question 2
The output cache also supports variations of cached GET or POST name/value
pairs.
The output cache respects the expiration and validation policies for pages. If a
page is in the output cache and has been marked with an expiration policy that
indicates that the page expires 60 minutes from the time it is cached, the page is
removed from the output cache after 60 minutes. If another request is received
after that time, the page code is executed and the page can be cached again. This
type of expiration policy is called absolute expiration - a page is valid until a
certain time.
4. Question 1:
What is an interface and what is an abstract class? Please, expand by examples of
using both. Explain why.
Answer
Abstract classes are closely related to interfaces. They are classes that cannot be
instantiated, and are frequently either partially implemented, or not at all
implemented. One key difference between abstract classes and interfaces is that a
class may implement an unlimited number of interfaces, but may inherit from
only one abstract (or any other kind of) class. A class that is derived from an
abstract class may still implement interfaces. Abstract classes are useful when
creating components because they allow you specify an invariant level of
functionality in some methods, but leave the implementation of other methods
until a specific implementation of that class is needed. They also version well,
because if additional functionality is needed in derived classes, it can be added to
the base class without breaking code.
5. Hi,
I want to know that how can we conver a report file into a Acrobat(PDF file), or
Word file for transport purpose over the internet.
2
Microsoft interview question 3
6. What is connection pooling and how do you make your application use it?
Opening database connection is a time consuming operation.
Connection pooling increases the performance of the applications by reusing the
active database connections instead of create new connection for every request.
Connection pooling Behaviour is controlled by the connection string parameters.
Follwing the the 4 parameters that control most of the connection pooling
behaviour.
1. Connect Timeout
2. Max Pool Size
3. Min Pool Size
4. Pooling
Please go through the following link as well
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q169470
8. Abstract vs Interface.
All abstract methods are virtual by default. They have to be overriden.
Interface methods are not virtual by default. When you are implementing an
interface method you can decide whether you want it to be virtual or not.
[Serializable]
public class MyObject {
public int n1 = 0;
public int n2 = 0;
3
Microsoft interview question 4
What is Viewstate?
A server control’s view state is the accumulation of all its property values. In
order to preserve these values across HTTP requests, ASP.NET server controls use
this property, which is an instance of the StateBag class, to store the property
values.
Explain how Viewstate is being formed and how it’s stored on client.
4
Microsoft interview question 5
DataSet.AcceptChanges method Commits all the changes made to this row since
the last time AcceptChanges was called.
URGENT
11. Question 1: in C# you can’t multiple inheritence so you have to use interfaces to
accomplish it.
12. Can anyone tell me that which language to use(VB.NET OR C# ) when all
languages are equal in .NET world?
13. Hi Harshad,
Regarding your question about which language to use. According to me you can
go ahead with any language, both C# and vb.net are same in functionality
( though they have differences also but which are not so important and what i
think we need not be worried about it). Following are few differences between c#
and vb.net (as mentioned in MSDN):
Case sensitivity
Variable declaration and assignment
Data types
Statement termination
Statement blocks
Use of () vs. []
Operators
Conditional statements
Error handling
Overflow checking
Parameter passing
Late binding
Handling unmanaged code
Keywords
What i feel is it all depends on the project’s requirement which to use. In one
company i was using only C# and in another only vb.net. One more thing many of
5
Microsoft interview question 6
our friends will have different opinion about it, so lets wait for their replies.This is
what i can tell you.
Regards
Manish
14. Hi gyan,
Every thing in .Net is an object. If you can be more exact i think more people can
help you.
15. One more question which troubles me a lot that reflection is used by the
framework transparently but when do we have to use it?
16. I am using a Mozilla Fire fox browser. I found few things listed are not working.
Can anyone give me a solution?
1. When the asp:panel is used in the aspx Page firefox browser doesn’t support
instead the layout is getting distorted. Can any one suggest a solution?
2. When the onMouseout of javascript do not work.
3. Many properties of the IE browser seems not working in Mozilla.
17. i never used smart navigation in my pages .I just gone through the comments
before using that, now i am not enough dare to use that in my application pages.
18. Q. If base class is abstract class and derived class inherits the base class and
derives class has it own function which is not abstract so how we use the derived
class functions. Actually does not instantiated
Object can be stored in viewstate as long as the object is serializable. you can
store string, arraylist etc in Viewstate.
6
Microsoft interview question 7
21. @@IDENTITY is used to retrieve the the last-inserted identity value in Sql
Server.
For downloading a file, use a hyperlink and specify the URL of the file as the
link.
For uploading a file, use the File Field control, from the HTML controls, to select
the file. Change it to run at server and use the upload or save(or something
similar) method associated with it.
27. How to handle date problem if application server and database server has diffirent
date format?
DateTime FromDate=new DateTime(2000,1,1);
DateTime ToDate=DateTime.Now;
_whereClause=”";
string
_frmdate=FromDate.Year.ToString()+FromDate.Month.ToString()+FromDate.Da
y.ToString();
7
Microsoft interview question 8
string
_todate=ToDate.Year.ToString()+ToDate.Month.ToString()+(ToDate.Day+1).ToSt
ring();