#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    6
    Rep Power
    0

    Question interview help plz!


    Hi friends,
    I am very new to c# world. I am preparing for an intern interview. I got these questions from my last interview. I want to be prepared for my comming interview so if u could help me out ... I will appreciate it.

    Compare and contrast the .NET platform with the J2EE platform. (Pick one or two points and describe.)

    Please elaborate on the differences between Abstract classes and Interfaces in C# or VB.NET.

    How do Value types and Reference types differ? Why might you explicitly define a type as a Value type?

    What is a user defined conversion?

    What are delegates? Provide an example of a problem which is elegantly solved using delegates.

    What is Remoting in .NET?

    Can you use pointers in C#?

    What does C#.NET provide to safeguard sections of code for multithreaded use? How would you protect an instance variable vs. a static variable?

    Thanks in advance.

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    109
    Rep Power
    12
    Compare and contrast the .NET platform with the J2EE platform. (Pick one or two points and describe.)

    They probably want you to talk about differences in the .NET and Java JIT compiler/garbage collector.
    Some obvious points:
    1) Java is cross platform.
    2) .NET performs extremely well (almost as fast as machine language).
    3) As a language C# is almost identical to Java.


    Please elaborate on the differences between Abstract classes and Interfaces in C# or VB.NET.

    An interface does not have any method implementations where an abstract class can have both implemented and non-implemented methods. I believe a parent class can only implement one abstract class where it can implement multiple interfaces.


    How do Value types and Reference types differ? Why might you explicitly define a type as a Value type?

    When you pass a value type to a method (usually a primitive (int, float ect.)) a copy of it is made in memory and any changes to it are not reflected in the method that called the method. This is not true for reference types (classes, arrays etc.) which is why you may want to explicitly define it as a value type. This is kind of a broad question, hard to know exactly what they wantÖ


    What is a user defined conversion?

    Donítí know what this is referring toÖ


    What are delegates? Provide an example of a problem which is elegantly solved using delegates.

    Delegates are basically function pointers. These are used heavily to implement events in objects (i.e. the On_Click event of a button). One way to elegantly implements them might be to construct a generic quick sort algorithm that takes a delegate with a custom comparison function as a parameter, this way you can use the quick sort algorithm to sort any array as long as you implement a comparison function for it. This is how qsort is implemented in C.


    What is Remoting in .NET?

    Donít know much about it, allows applications to communicate with each other (maybe TCP/IP?)


    Can you use pointers in C#?

    Yes. You can use pointers in unsafe blocks. Fixed statements are used to control the unmanaged memoryís existence.


    What does C#.NET provide to safeguard sections of code for multithreaded use? How would you protect an instance variable vs. a static variable?

    Remember reading about this but canít remember how .NET does it. Second question is a little ambiguous. Locking? Scope?


    Good luck,
    Nem

IMN logo majestic logo threadwatch logo seochat tools logo