A dozen .NET questions

  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?
This entry was posted in .NET. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

26 Comments on A dozen .NET questions

  1. Posted 10/14/2006 at 3:19 pm | Permalink

    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
    Posted 10/14/2006 at 11:17 pm | Permalink

    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
    Posted 10/14/2006 at 11:21 pm | Permalink

    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
    Posted 10/14/2006 at 11:22 pm | Permalink

    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
    Posted 10/14/2006 at 11:23 pm | Permalink

    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
    Posted 10/18/2006 at 6:02 am | Permalink

    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
    Posted 10/19/2006 at 5:53 am | Permalink

    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
    Posted 10/23/2006 at 4:15 am | Permalink

    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
    Posted 10/23/2006 at 4:40 am | Permalink

    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
    Posted 10/23/2006 at 4:41 am | Permalink

    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
    Posted 10/27/2006 at 5:52 am | Permalink

    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. Posted 11/20/2006 at 6:34 am | Permalink

    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
    Posted 11/24/2006 at 4:56 am | Permalink

    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.
    Posted 12/21/2006 at 5:11 am | Permalink

    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
    Posted 1/8/2007 at 1:57 am | Permalink

    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
    Posted 2/26/2007 at 7:21 am | Permalink

    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
    Posted 3/27/2007 at 2:03 pm | Permalink

    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]
    Posted 4/24/2007 at 6:03 am | Permalink

    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
    Posted 8/11/2007 at 9:16 am | Permalink

    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
    Posted 9/20/2007 at 3:46 am | Permalink

    can there be more than one destructors in c#?

    can there be destructor overloading? with all different arguments?

  21. Harshul Shah
    Posted 11/1/2007 at 5:23 am | Permalink

    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
    Posted 11/29/2007 at 4:57 am | Permalink

    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. Posted 12/1/2007 at 10:52 am | Permalink

    I want a answer of

    1) what is a fake pointer?

  24. Rajhans
    Posted 12/12/2008 at 1:40 am | Permalink

    what is a fake pointer?

    A pointer that was not created by the Memory Manager but is passed to some Memory Manager routine.

  25. Aashish
    Posted 1/12/2009 at 6:08 pm | Permalink

    DLL and EXE both are the part of assembly.DLL are simply linked with a core program while an EXE is independently a program.

  26. Aashish
    Posted 1/12/2009 at 6:10 pm | Permalink

    2) EXE is the part of an assembly but nesting of EXE is impossible, hence nesting of EXE is not possible.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*