Thứ Ba, 30 tháng 12, 2008

Dot Net Interview Questions - Part 3

1.What is a stack? What is a heap?

Ans : Stack is a place in the memory where value types are stored. Heap is a place in the memory where the reference types are stored.

2.What is Boxing/Unboxing?

Ans : Boxing is used to convert value types to object.
E.g. int x = 1;
object obj = x ;
Unboxing is used to convert the object back to the value type.
E.g. int y = (int)obj;

3.What is globalization?

Ans : Globalization is the process of customizing applications that support multiple cultures and regions.

4.What is localization?

Ans : Localization is the process of customizing applications that support a given culture and regions.

5.What is Ilasm.exe used for?

Ans : Ilasm.exe is a tool that generates PE files from MSIL code. You can run the resulting executable to determine whether the MSIL code performs as expected.

6.What is Ildasm.exe used for?

Ans : Ildasm.exe is a tool that takes a PE file containing the MSIL code as a parameter and creates a text file that contains managed code.

7.What is the ResGen.exe tool used for?

Ans : ResGen.exe is a tool that is used to convert resource files in the form of .txt or .resx files to common language runtime binary .resources files that can be compiled into satellite assemblies.

8.What happens when you change the web.config file at run time?

Ans : ASP.NET invalidates the existing cache and assembles a new cache. Then ASP.NET automatically restarts the application to apply the changes.

9.Explain the AutoPostBack feature in ASP.NET?

Ans : AutoPostBack allows a control to automatically postback when an event is fired. For eg: If we have a Button control and want the event to be posted to the server for processing, we can set AutoPostBack = True on the button.

10.What are Master Pages?

Ans : Master pages is a template that is used to create web pages with a consistent layout throughout your application. Master Pages contains content placeholders to hold page specific content. When a page is requested, the contents of a Master page are merged with the content page, thereby giving a consistent layout.

11.What are the types of Caching?

Ans : 1.Application Cache 2.Page Output Cache 3.Variable Cache

12.Method Parameters in C#?

Ans : 1. REF,2. OUT,3.PARAMS

13.What’s the .NET datatype that allows the retrieval of data by a unique key?

Ans : HashTable.

14.How do you debug an ASP.NET Web application?

Ans : Attach the aspnet_wp.exe process to the DbgClr debugger.

15.What is the syntax to inherit from a class in C#?

Ans : Place a colon and then the name of the base class.

Example: class MyNewClass : MyBaseClass

16.What’s a bubbled event?

Ans : When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

17.What does WSDL stand for?

Ans : Web Services Description Language.

18.Can you override private virtual methods?

Ans : No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.

19.What is an out parameter?

Ans : An out parameter allows an instance of a parameter object to be made inside a method. Reference parameters must be initialised but out gives a reference to an uninstanciated object.

20.What is recursion?

Ans : Recursion is when a method calls itself.

21.Name 10 C# keywords.

Ans : abstract, event, new, struct, explicit, null, base, extern, object, this

22.What is a DLL?

Ans : A set of callable functions, which can be dynamically loaded.

23.What is unsafe code?

Ans : Unsafe code bypasses type safety and memory management.

24.How would you read and write using the console?

Ans : Console.Write, Console.WriteLine, Console.Readline

25.What’s the difference between // comments, /* */ comments and /// comments?

Ans : Single-line comments, multi-line comments, and XML documentation comments.

11 nhận xét:

  1. I enjoy examining and I think this website got some truly utilitarian stuff on it!

    Trả lờiXóa
  2. I got what you intend, regards for putting up. Woh I am thankful to find this website through google.

    Trả lờiXóa
  3. Loving the information on this website, you have done great job on the posts.

    Trả lờiXóa
  4. I totally agree. Wish there were more people who see things this way. Thank you!

    Trả lờiXóa
  5. I can show you a formulation which you can use in order to make a website that will automatically generate profits 24 hours a day. It really is all detailed in a video that I created. Now I am sharing this with you! So go right on ahead and take a peek at my video...

    Trả lờiXóa
  6. symptoms of low vitamin d...

    I found your blog website on google and verify a couple of of your early posts. Proceed to maintain up the excellent operate. I simply extra up your RSS feed to my MSN News Reader. Looking for forward to reading extra from you later on!๏ฟฝ...

    Trả lờiXóa
  7. Would love to perpetually get updated great blog!

    Trả lờiXóa
  8. I've read several good stuff here. Definitely price bookmarking for revisiting. I surprise how much attempt you place to create this type of wonderful informative site.

    Trả lờiXóa
  9. You made some nice points there. I did a search on the subject and found most persons will consent with your website.

    Trả lờiXóa
  10. Normally I don't learn article on blogs, but I would like to say that this write-up very pressured me to take a look at and do it! Your writing style has been surprised me. Thank you, very nice article.

    Trả lờiXóa
  11. certainly like your web-site but you need to check the spelling on several of your posts. A number of them are rife with spelling issues and I to find it very troublesome to inform the truth on the other hand I'll definitely come back again.

    Trả lờiXóa