.Net Technologies Interview Questions and Answers for Experienced Professionals


Tips to remember :
  • 1. First of all think about What I Want To Hear If I Ask You To Tell Me About Yourself
  • 2. Start with the present and tell why you are well qualified for the position.
  • 3. Best to start with a strong simple statement about yourself (again related to the job and type of person they are looking for) and expand with a synthesized work history that shows how miraculously every thing you have done up to now has led you to this precise moment and prepared you perfectly for this job!

My main role is coding, unit testing, bug fixing and maintenance. My team size is 60 Approx.

Please include the technologies you used in your projects and what kind of architecture (for example: 3-tire, n- tier) you used.

CLR provides an environment to execute MET applications on target machines.
  • • CLR (Common Language Runtime) is a heart of Dot Net Framework.
  • • It is a core runtime environment of .NET Framework for executing applications. The main function of Common Language Runtime (CLR) is to convert the Managed Code into native code and then execute the Program. It acts as a layer between Operating Systems and the applications written in .Net languages.
  • • CLR handles the execution of code and provides useful services for the implementation of the program. In addition to executing code, CLR provides services such as memory management, thread management, security management, code verification, compilation, and other system services.
  • • CLR-is also a common runtime environment for all MET code irrespective of their programming language, because the compilers of MET Framework convert every source code into a common language known as MSIL .
  • • CLR also provides various services to execute processes, such as memory management service and security services..CLR performs various tasks to manage the execution process of MET applications. The responsibilities of as are listed below:
  • • Base Class Libraries: It provides class libraries supports to an application when needed. MSIL Code to Native Code: The Common Language Runtime is the engine that compiles the source code in to an intermediate language. This intermediate language is called the Microsoft Intermediate Language.
  • • During the execution of the program this MSIL is converted to the native code or the machine code. This conversion is possible through the Just-In-Time compiler. During compilation the end result is a Portable Executable file (PE).
  • • Garbage Collection —Garbage collection Is the major role of CUR, with prevents memory leaks during execution of programs. The Garbage collector of CLR automatically determines the best time to free the memory, which is reserved by an object for execution.
  • • Code Access Security —Code Access Security (CAS) model is used in MET Framework to impose restrictions and security during execution of programs. CLR uses security objects to manage access to code during execution of MET applications. as allows an executing code to perform only those tasks for which it has permission.

1. In c# a static class cannot implement an interface. When a single instance class needs to implement an interface for some business reason or IoC purposes, you can use the Singleton pattern without a static class.

2. You can clone the object of Singleton but, you can not clone the static class object

3. Singleton object stores in Heap but, static object stores in stack

4. A singleton can be initialized lazily or asynchronously while a static class is generally initialized when it is first loaded

PDB is an abbreviation for Program Data Base. It is a repository (persistant storage as databases) to maintain information required to run your program in debug mode. It contains many important relevant information required while debugging your code; for e.g. at what points you have inserted break points where you expect the debugger to break in Visual Studio etc..

• Singletons aren’t easy to handle with unit tests. You can’t control their instantiation and they may retain state across invocations.

• Memory allocated to an Singleton can’t be freed.

• In multithreaded environment, access to the singleton object may have to be guarded (e.g. via synchronization).

• Singletons promote tight coupling between classes, so it is hard to test

Unicode :

Unicode is a standard that can handle characters for almost all modern languages and even some ancient languages at the same time, as long as the client has fonts for the particular language installed in his system.


UTF :

Unicode assigns each character a unique number, or code point. It defines two mapping methods, the UTF (Unicode Transformation Format) encodings, and the UCS (Universal Character Set) encodings. Unicode-based encodings implement the Unicode standard and include UTF-8, UTF-16 and UTF-32/UCS-4. They go beyond 8-bits.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RefClass
{
class Program
{
static void Main(string[] args)
{
B bObj= new B();
Console.ReadLine();
}
}
public class A { public A()
{
Console.WriteLine("Hi you are in class A");
}
}
public class B:A
{
public B()
{
Console.WriteLine("Hi you are in class B");
}
}
}

---------------------Answer------------------

the output will be as preceding.

Hi you are in class A

Hi you are in class B


Even though you are creating an object of the derived class, it will invoke the base class first.

1.alert('5' + 5 + 5);
2. alert(5 + 5 + '5');
3. alert(5 + '5' + '5');
4. alert(5 + '5' );
-------------Answer-----------------

That was little tricky !!.


1.alert('5' + 5 + 5); Output= 555
2. alert(5 + 5 + '5'); Output= 105
3. alert(5 + '5' + '5'); Output= 555
4. alert(5 + '5' ); Output= 55

When the async method finishes the processing, AsyncCallback method is automatically called, where post processing stmts can be executed. With this technique there is no need to poll or wait for the async thread to complete.

EXE:
  • 1. Executable file, can run independently
  • 2. It runs in a separate process
  • 3. It can't be reused in application
  • 4. it has a main function
DLL:
  • 1. Dynamic link library is used as part of EXE or other DLL's
  • 2. It runs in application process memory
  • 3. It can be reused in application
  • 4. It does not have a main function

Basic difference between Web Services and Web APIs

Web Service:

1) It is a SOAP based service and returns data as XML.

2) It only supports the HTTP protocol.

3) It can only be hosted on IIS.

4) It is not open source, but can be used by any client that understands XML.

5) It requires a SOAP protocol to receive and send data over the network, so it is not a light-weight architecture.

Web API:

1) A Web API is a HTTP based service and returns JSON or XML data by default.

2) It supports the HTTP protocol.

3) It can be hosted within an application or IIS.

4) It is open source and it can be used by any client that understands JSON or XML.

5) It is light-weight architectured and good for devices which have limited bandwidth, like mobile devices.

SOAP:
  • 1. SOAP is a protocol.
  • 2. SOAP stands for Simple Object Access Protocol.
  • 3. SOAP uses services interfaces to expose the business logic.
  • 4. SOAP defines standards to be strictly followed.
  • 5. SOAP defines its own security.
  • 6. SOAP permits XML data format only.
REST:
  • 1. REST is an architectural style.
  • 2. REST stands for REpresentational State Transfer.
  • 3. REST uses URI to expose business logic.
  • 4. REST does not define too much standards like SOAP.
  • 5. RESTful web services inherits security measures from the underlying transport.
  • 6. REST permits different data format such as Plain text, HTML, XML, JSON etc

1. If we having huge datas to be transferred instead of sending all those datas as dataset you can opt xml.\

2. XML is easy to parse and it enables a faster accessing of datas.

3. Case sensitiveness is an additional advantage in validating the authentication for the user.

4. XML can be passed irrespective of OS, port and protocol.

Who Should Read TechTrick?

All the tricks and tips that TechTrick provides only for educational purpose. If you choose to use the information in TechTrick to break into computer systems maliciously and without authorization, you are on your own. Neither I (TechTrick Admin) nor anyone else associated with TechTrick shall be liable. We are not responsibe for any issues that caused due to informations provided here. So, Try yourself and see the results. You are not losing anything by trying... We are humans, Mistakes are quite natural. Here on TechTrick also have many mistakes..