Thursday, February 23, 2012

Basic .NET, ASP.NET, OOPS and SQL Server Interview questions

  1. What is IL code, CLR, CTS, GAC & GC?
  2. How can we do Assembly versioning?
  3. can you explain how ASP.NET application life cycle and page life cycle events fire?
  4. What is the problem with Functional Programming?
  5. Can you define OOP and the 4 principles of OOP?
  6. What are Classes and Objects?
  7. What is Inheritance?
  8. What is Polymorphism, overloading, overriding and virtual?
  9. Can you explain encapsulation and abstraction?
  10. What is an abstract class?
  11. Define Interface & What is the diff. between abstract & interface?
  12. What problem does Delegate Solve ?
  13. What is a Multicast delegate ?
  14. What are events and what's the difference between delegates and events?
  15. How can we make Asynchronous method calls using delegates ?
  16. What is a stack, Heap, Value types and Reference types ?
  17. What is boxing and unboxing ?
  18. Can you explain ASP.NET application and Page life cycle ?
  19. What is Authentication, Authorization, Principal & Identity objects?
  20. How can we do Inproc and outProc session management ?
  21. How can we windows , forms and passport authentication and authorization in ASP.NET ?
  22. In a parent child relationship which constructor fires first ?

2 comments:

  1. Another cool feature of C# 3.0 is Extension Methods. They allow you to extend an existing type with new functionality, without having to sub-class or recompile the old type. For instance, you might like to know whether a certain string was a number or not. The usual approach would be to define a function and then call it each time, and once you got a whole lot of those kind of functions, you would put them together in a utility class, like this:

    public class MyUtils
    {
    public static bool IsNumeric(string s)
    {
    float output;
    return float.TryParse(s, out output);
    }
    }

    Now you could check a string by executing a line of code like this:

    string test = "4";
    if (MyUtils.IsNumeric(test))
    Console.WriteLine("Yes");
    else
    Console.WriteLine("No");

    However, with Extension Methods, you can actually extend the String class to support this directly. You do it by defining a static class, with a set of static methods that will be your library of extension methods. Here is an example:

    public static class MyExtensionMethods
    {
    public static bool IsNumeric(this string s)
    {
    float output;
    return float.TryParse(s, out output);
    }
    }

    The only thing that separates this from any other static method, is the "this" keyword in the parameter section of the method. It tells the compiler that this is an extension method for the string class, and that's actually all you need to create an extension method. Now, you can call the IsNumeric() method directly on strings, like this:

    string test = "4";
    if (test.IsNumeric())
    Console.WriteLine("Yes");
    else
    Console.WriteLine("No");

    ReplyDelete
  2. Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work!!! 2k injection molding

    ReplyDelete