You must Sign In to post a response.
  • Category: Career Guidance

    Interview preparation

    Recently, I've faced an interview and here are few questions for which I need your help.

    Hi experts,

    Recently, I've faced an interview and here are few questions for which I need your help.

  • Difference between structure and class.
  • Can we do typecasting in dictionary?
  • What is anonymous in OOPs?
  • Explain OOPs concepts.

    During interview, I got confused when asked "Explain OOPs concept". I did not understand how and where to start with answers.
  • #760918


    The four pillars of OOPs are:
    *Writing all members and member functions
    together which is also called as data binding is
    called encapsulation.

    *Hiding the data which is hiding complexity with
    the help of access modifiers is called

    3.Polymorphism:(Many forms)
    *Having same name for two or more methods
    with different arguments is called overloading.
    *It is also called as early binding.
    *Having same name for methods in base class
    and derived class with same arguments is called
    *It is also called as late binding.

    *Parent class features are utilized in child class as hierarchy or Inheriting parent class with the help of child class is inheritance.


    Sridhar Thota.
    "Poverty means Poverty of knowledge"

    Sridhar Thota.
    Editor: DNS Forum.

  • #760919

    Hi Rohini,

    I might be late but I would like to take this thread with my views as here:

    1. Difference between Structure and Class

    A structure in C# is simply a composite data type [you are well aware from composite data type, refer to data types for more details], which consists number of members of other types. The structure define simply by using the struct keyword

    It is cleared from above study that Classes are reference type. A class is a collection of its data members. Data members are those members of class which contains the data of class like fields, constants and events etc. Class is declared simply just followed by class keyword with optional modifiers; by default C# classes are private.

    For your reference:

    2. Can we do Typecasting in Dictionary
    Yes, we can but its bit complex to cast Dictionary between dictionary.
    For your reference see this thread:

    3. What is Anonymous in OOP's
    Not cleared, are you referring Anonymous types of a specific language related to OOPS.
    Refer to msdn:

    4. Explain OOPs concepts

    How to start: You just start with basic definition and then gradually go with Abstraction, Inheritance, Polymorphism and Encapsulation. If possible try to give real time example, if you can avoid to give bookish examples.

    What to Say: If you are confident that you know the concept go in depth if interviewer asked.

    What not to say: Do not try to make lengthy answer if you do not have confident with your answer.

    I do not want to create any new definition, just refer to WIKI:

    Please feel free to revert back or contact me directly for any further/more assistant.

    Thanks & regards,
    Gaurav Kumar Arora
    Site Coordinator - DNS
    My blog -

  • Sign In to post your comments
    Submit New Thread
    Return to Return to Discussion Forum