Monday, March 24, 2008

A dozen .NET questions @ Tech Interviews.com

A dozen .NET questions @ Tech Interviews.com

  1. Differences between DLL and EXE?
  2. Can an assembly have EXE?
  3. Can a DLL be changed to an EXE?
  4. Compare & contrast rich client (smart clients or Windows-based) & browser-based Web application
  5. Compare Client server application with n-Tier application
  6. Can a try block have more than one catch block?
  7. Can a try block have nested try blocks?
  8. How do you load an assembly at runtime?
  9. If I am writing in a language like VB or C++, what are the procedures to be followed to support .NET?
  10. How do you view the methods and members of a DLL?
  11. What is shadowing?
  12. What are the collections you’ve used?

23 Responses to “A dozen .NET questions”

  1. mahesh L.Nalawade Says:

    DLL is a in-process server while exe is a out-process server it means dll works within the thread of application while exe works after creating its own thread.

    Dll is not affect efficiency of application b’caz not taking extra space in memory to run.

    if dll fails the application became fail if exe fails dll doesn’t fail because its not work within the thread of application but the part of the exe could not work properly.

  2. sandeep Says:

    Can a try block have more than one catch block?

    yes a try block can have any number of catch block but only one will execute which matches the error!

  3. sandeep Says:

    What are the collections you’ve used?
    collection which we use are
    1. Array List
    2. Hashtable
    3. stack
    4. queue
    5. dictionary

  4. sandeep Says:

    Can a DLL be changed to an EXE?
    yes, a dll can be changed to an exe, if we provide it the main entry function

  5. sandeep Says:

    Can a try block have nested try blocks?

    yes a try block can have nested try block, but every nested try block has a proper catch block, which can catch the error

  6. Kannan Says:

    Shadowing :

    This is a VB.Net Concept by which you can provide a new implementation for the base class member without overriding the member. You can shadow a base class member in the derived class by using the keyword “Shadows”. The method signature,access level and return type of the shadowed member can be completely different than the base class member.

  7. suman Says:

    Can a try block have more than one catch block?

    yes we can have multipile catch block , if we r not able to predict wht type of exception will be occure at runing of tht particular function .

  8. Anish Sharma Says:

    Can an assembly have EXE?

    Yes. Possible in Framework 2.0. In version 1.1 of the CLR classes can only be exported from library assemblies; in version 2.0 this restriction is relaxed. The compiler will have a switch to determine if the assembly is a process or library and will set a flag in the PE file. .NET does not use the extension to determine if the file is a process or library. This means that a library may have either .dll or .exe as its extension.

  9. Anish Sharma Says:

    3. How do you load an assembly at runtime ?
    Reflection to load assembly dynamically and getting interface information and instantiating the assembly dynamically. You can also get all the methods names.
    OR
    An assembly can be loaded and its method are called dynamically using Reflection.

  10. Anish Sharma Says:

    8. How do you load an assembly at runtime ?

    Reflection to load assembly dynamically and getting interface information and instantiating the assembly dynamically. You can also get all the methods names.
    OR
    An assembly can be loaded and its method are called dynamically using Reflection.

  11. Rajesh Says:

    10.You use ILDASM in commandline prompt to display method and members of DLL.Before runtime.

    At Runtime we use reflections.To view methods and menbers of DLL.

  12. Dheeraj Verma Says:

    In shortcut .exe is a executable file & .dll is not a executable file.
    An EXE is visible to the system as a regular Win32 executable. Its entry
    point refers to a small loader which initializes the .NET runtime and tells
    it to load and execute the assembly contained in the EXE.
    A DLL is visible to the system as a Win32 DLL but most likely without any
    entry points. The .NET runtime stores information about the contained
    assembly in its own header.

  13. naveen Says:

    Can an .exe run in a system which doesnt have the .net framework? How can we make the exe work without installing .net explicitly in the user system?

  14. Vinod Kumar P. Says:

    What is shadowing?
    When the method is defined as Final/sealed in base class and not overridable and we need to provide different implementation for the same. We define method with Shadows/new.

  15. Praveen Says:

    Can an .exe run in a system which doesnt have the .net framework? How can we make the exe work without installing .net explicitly in the user system?

    It is not possible to run .exe without the framework. This is ‘coz the classes that u r calling doesnot exist.

    U should package the .net framework in the .exe before deploying it in non-existence of framework systems.

  16. Victor Fernandez Says:

    7. Yes. A try block can have multible try block, the only constraint is, each try block should contain appropriate catch block.

  17. Hrach Gyulzadyan Says:

    How do you load an assembly at runtime?

    You must place the dll file in the bin directory and then include it’s namespaces in you application with Imports/using keywords

  18. DotNetUser [basa.mailid@gmail.com] Says:

    How do you view the methods and members of a DLL?

    System.Reflection.Emit; namespace is having the GetMethods(Binding Attributes) methods where we can specify for the filteration of which type of methods you want some thing like (public,private..).

  19. Sanjita Says:

    Rich vs thin Clients

    A thin client machine is going to communicate with a central processing server, meaning there is little hardware and software installed on the user’s machine. At times, thin may be defined as simply not needing the software or operating system installed on the user machine. This allows all end users’ systems to be centrally managed and software deployed on a central server location as opposed to installed on each individual system.

    Thin clients are really best-suited to environments in which the same information is going to be accessed by the clients, making it a better solution for public environments. For this reason, thin clients are often deployed in hotels and airports, where installing software to all systems wouldn’t make sense. It would be a massive headache for IT to both deploy and maintain.

    When using thin clients, compared to a feature-rich desktop PCs today, they often tend to look a bit primitive and outdated. Since many thin clients run on very little hardware, it is impossible to incorporate rich graphical user interfaces. To use the client, an input device (keyboard) and viewing device (display) is usually the basic requirements. Some may not even require a mouse.

    In contrast, a thick client will provide users with more features, graphics and choices making the applications more customizable. Unlike thin clients, thick clients do not rely on a central processing server because the processing is done locally on the user system, and the server is accessed primarily for storage purposes. For that reason, thick clients often are not well-suited for public environments. To maintain a thick client, IT needs to maintain all systems for software deployment and upgrades, rather than just maintaining the applications on the server. Additionally, thick clients often require operating specific applications, again posing more work and limitations for deployment. The trade-off is a more robust and local computing environment.

  20. Riddhi Says:

    can there be more than one destructors in c#?

    can there be destructor overloading? with all different arguments?

  21. Harshul Shah Says:

    5. Compare Client server application with n-Tier application
    Answer:
    Client Server Application is a simple 2-tier application where there are only 2 tiers involved that are Presentation and DB. The Client tier represents the UI where as the Server tier represents the Business rules and Database. There is no separation of Business Logic from Database. Everything is coupled in a same tier. Usually, Client Server Architecture is used for the small scaled systems where the Business Logic is not so complex & lengthy at the same time it does not require frequent updating.
    The n-Tier Application Architecture is usually a 3 tier or more tier application architecture where each tier represents a different layer of the application. In case of 3 tier architecture, it comprises Presentation Tier, Business Logic Tier and Database Tier. In case of n-tier architecture, we can use another tier for any 3rd party package to integrate in our application. The biggest advantage of using n-tier architecture is to manage the application layers efficiently. In case of an update in any tier of an application does not affect the whole application to shutdown or to put it on hold. In majority of the cases, the Business Logic requires updating frequently in any medium to large scaled projects hence for any Business Application; it is useful to implement n-Tier Architecture instead of simple Client Server Application Architecture.

  22. Veera Venkata Says:

    Differences between DLL and EXE
    EXE
    1.exe can run on its own
    2.it is not shared with other application.

    DLL
    1.dll can’t run on its own
    2.it is shared with multiple applications.

  23. Swapnil Says:

    I want a answer of

    1) what is a fake pointer?

No comments:

如何发掘出更多退休的钱?

如何发掘出更多退休的钱? http://bbs.wenxuecity.com/bbs/tzlc/1328415.html 按照常规的说法,退休的收入必须得有退休前的80%,或者是4% withdrawal rule,而且每年还得要加2-3%对付通胀,这是一个很大...