Here are some common questions on .Net which can be asked in interviews:
Describe the difference between a Thread and a Process?
An application consists of one or more processes. A process, in the simplest terms, is an executing program. One or more
threads run in the context of the process. A thread is the basic unit to which the operating system allocates processor
time. A thread can execute any part of the process code, incluging parts currently being executed by another thread.
What is a Windows Service and how does its lifecycle differ from a “standard” EXE?
Windows service allows you to create long-running executable applications that run in their own windows sessions. These
services can be managed to start at the boot time or can be controlled manually. The windows service do not have any UI to show
to the user.
Windows service lifetime:
For the service to run, it need to be installed. With the installation, it will load the service into the Service control manager
. Once the service is installed, one can start from the Service Control Manager or from code “start”. The service will run until someone
stops it or the system is shutdown. The service can in any one of these status running, paused or stopped. One can write code to
handle in these statuses.
Standard ‘Exe’ need to be started manually everytime you log in. Standard ‘Exe’ can have UI for the user.
What is the difference between an EXE and a DLL?
EXE is an extension used for executable files while DLL is the extension for a dynamic link library.
An EXE file can be run independently while a DLL is used by other applications
An EXE file defines an entry point while a DLL does not
A DLL file can be reused by other applications while an exe cannot.
A dll would share the same process and memory space of the calling application while an exe creates its separate process and memory space.
What is strong-typing versus weak-typing?
Strong typing means that once assigned a value of a particular kind, objects objey strict rules about how they can interact with other objects of vaious types.
Weak typing means that such rules are more relaxed.
Python is considered strongly typed while PHP is considered weak-typing.
still to come…