.Net & C# Interview question, along with general programming questions

Hey, These are some Interview Questions with suggested answers we collected in Middle-East-Developers, for more questions in other fields like C++, you can check the group.
These questions are collected by

  • Adel Khalil
  • Yehia Megahed
  • Hisham Abd El-Hafez

  • Mohammed Hossam
Q1: Can DateTime variables be null?
A1: No, because it is a value type (Struct)

Q2: Describe the Asp.net Page Life Cycle?
A2: http://msdn2.microsoft.com/en-us/library/ms178472.aspx

Q3: Describe the Asp.net pipeline ? Give an Example when you need to extend it? How do you do so?
A3: http://msdn.microsoft.com/msdnmag/issues/02/09/HTTPPipelines/

Q4: Describe the accessibility modifier protected internal
A4: Members are accessible to derived classes and classes within the same Assembly

Q5: Difference between an interface and abstract class?
A5: In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.

Q6: How do you perform pre- and post-processing to extend a WebMethod ?
A6: Use SOAP extensions ...http://msdn.microsoft.com/msdnmag/issues/04/03/ASPColumn/

Q7: What are Design Patterns?
A7: It is a big topic in Object Oriented, so for more information see this, http://dofactory.com/Patterns/Patterns.aspx

Q8: What do you know about .net framework 3.0 ?
A8: any answer that introduces Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), Windows Presentation Foundation (WPF) and Windows Card Space (WCS) is right, also you can mention that it was originally called WinFX

Q9: What do you know about ATLAS (Microsoft ASP.net AJAX Extensions) ?
A9: for more information check here, http://ajax.asp.net

Q10: What do you know about Agile software methodologies?
A10: http://en.wikipedia.org/wiki/Agile_software_development

Q11: What do you know about Web Services Enhancements (WSE)?
A11: http://msdn.microsoft.com/webservices/webservices/building/wse/default.aspx

Q12: What is AJAX ?
A12: Asynchronous Javascript And XML

Q13:What is NUnit, or What is Unit testing?
A13: Unit testing: is a procedure used to validate that a particular module of source code is working properly from each modification to the next. The procedure is to write test cases for all functions and methods so that whenever a change causes a regression, it can be quickly identified and fixed. Ideally, each test case is separate from the others; constructs such as mock objects can assist in separating unit tests. This type of testing is mostly done by the developers, NUnit is a famous tool for Unit Testing in .net

Q14: What is an Asp.net Http Handler & Http Module?
A14: http://www.15seconds.com/issue/020417.htm

Q15: What is mutable type ? immutable type ?
A15: Immutable type are types whose instance data, fields and properties, does not change after the instance is created. Most value types are immutable, but the mutable type are A type whose instance data, fields and properties, can be changed after the instance is created. Most Reference Types are mutable.

Q16: What is the HttpContext Object? Where is it accessible?
A16: It's is an Object that Encapsulates all HTTP-specific information about an individual HTTP request. it is avaliable through out the Asp.net request pipline.

Q17: What is the difference between String & StringBuilder classes?
A17: String is an immutable type while StringBuilder is a mutable type

Q18: What's the difference between C# 1.0 & C# 2.0?
A18: Any answer that introduces stuff like, Generics, Anonymous Methods, Nullable types, Iterators ... etc, is correct

Q19: Without using the multiplication or addition operations, how can you multiply a number x by 8?
A19: Shift x to the left 3 times, x << 3, because every shift left multiplies the number by 2

Q20: What is the difference between ASP.net 1.x & ASP.net 2.0 ?
A20: Any answer that include stuff like Provider model (membership provider, role provider ... etc) and Master Pages, Code Beside model, new web controls will be ok.

If you have more questions feel free to join the user group and add them directly to the database.
kick it on DotNetKicks.com

Comments (2)

  1. Anonymous says:


    i have som question about c#

    who to fine answer

  2. Anonymous says:

    i have a problem with EF

    when i have an error continue for program As appropriate is Impossible


    example if i want to delete father (Orphaned) i have exception

    but in try {}catche the continuation is damage

Skip to main content