United Health Group Technical Interview for 4+ years experience in dotnet


United Health Group Technical Interview for 4+ years experience in dotnet. I am listing here the first round of my technical interview experience with United Health Group. This interview was for 4+ years experience in dotnet. this was a telephonic round.

United Health Group Technical Interview for 4+ years experience in dotnet.
I am listing here the first round of my technical interview experience with United Health Group. This interview was for 4+ years experience in dotnet. this was a telephonic round.

SQL SERVER
1.Difference between stored procedure and function.
Ans:A StoredProcedure can return zero or more values whereas function must return a value.
Stored Procedures can have both input and output parameters whereas functions can have only input parameters.
Stored Procedure allows select and Insert,Update,Delete statements in it whereas function can have only select statement in it.
Functions can be called from Stored Procedure whereas procedures cannot be called from a function.

WCF and Web Services
1.Difference between WCF and Web Services.
Ans:Webservices can only use HTTP/HTTPS protocol. We cannot use TCP/MSMQ protocols with it.
WCF can use HTTP/TCP/MSMQ/Named Pipes.
Web service has to be hosted in IIS whereas WCF service can be self hosted or hosted in IIS/WAS/windows Service.
WCF uses DataContract Serialization whereas WebService uses XML serialization
2.How do we know that which address the client is connecting to in case of a WCF Service.
Ans:using endpoints which has address where the WCF service is located.
C#
1.Difference between Structures and Classes.
Ans:Classes are Reference types and Structures are Values types.
Classes will support an Inheritance whereas Structures won’t.
We cannot have instance Field initializers in structs but classes can have instance Field initializers.
classes can have constructors but structs do not have default constructors

2.Does Structure implement Inheritance/Interface?
Ans:There is no inheritance concept for structs but a struct can implement interfaces.

3.Can Structures have constructors. How the members of the structures are initialized.
Ans:No Structures do not have default constructors. whereas paramterized constructors are allowed.


4.Difference between Value Types and Referenec Types.
Ans:A variable that is declared pf value type(int,double...), stores the data, while a variable of a reference type stores a reference to the data.
Value type is stored on stack whereas a reference type is stored on heap.
Value type has it own copy of data whereas reference type stores a reference to the data.

5.When an integer variable is declared in a class. Is this integer variable a value type or a reference type.
Ans: It is a value type but the memory is allocated on heap.

5.Difference between ref keyword and out keyword.
Ans:ref keyword tells the compiler that the object is initialized before it enters the function, whereas the out keyword tells the compiler that the object will be initialized inside the function.

6.Is there any difference when you pass a value type using a ref keyword and a reference type using a ref keyword.
Ans:No Difference because when you pass any value type or a reference type to a method by reference using the 'ref' keyword, it will pass the reference to the actual data. There is no copying of the value.

7.Difference between readonly and const keywords. can you use these keywords with reference types.
Ans:The value of const is set at compile time and can't change at runtime
Const are static by default.
The readonly keyword marks the field as unchangeable. However it can be changed inside the constructor of the class

8.What are delegates and events. What is the default handler in C#.
9.What is polymorphism. What are the types of polymorphism and how they are implemented.
10.Difference between exe and dll.
11.Types of assemblies
12.Is public static void Main() method available in console based applications/Windows/Web applications?
13.A dll in GAC and a dll on a network which one is secure and why?
WPF
1. Difference between MVVM pattern and n-tier architecture.
2.Advantages of using MVVM pattern
3.Have you used PRISM in your project.


Comments

Author: Pawan Awasthi25 May 2013 Member Level: Gold   Points : 3

Thanks for posting such a nice question with the answer for 4+ years experience.
Now a days there are the requirements in UHG and i hope most of the folks are preparing for attending the interviews. Such kind of initiatives will definitely take them to crack the interviews.
Thanks a lot. For the remaining questions which are unanswered i will try to post the answers.

Author: Pawan Awasthi25 May 2013 Member Level: Gold   Points : 10

Below I am trying to provide the answers of the remaining questions.
8. What are delegates and events. What is the default handler in C#.
Ans. A Delegate is an object, which points to another method in the application. Delegate holds, name of the method, arguments of the method (if any) and the return type of the method.
See the below points regarding the Delegate:-
• delegate keyword is sealed type in System. Multicast namespace.
• Delegate works like a function pointer in C language.
• Delegate holds the address of the function.
• Delegate hides the actual information which is written inside the method definition.
• A delegate can hold address of a single function as well as the address of multiple functions.
• There are 2 types of delegate- Single-cast delegate (hold single function) and Multicast delegate(hold multiple functions).
• Addition and subtraction are allowed for the delegates but NOT multiplication and division. It means, we can add delegates, subtract delegates etc.
e.g. To create a single cast delegate, first we can create a class with a method as:
public class DelegateDemo
{
public void Show(string msg)
{
Console.WriteLine(msg);
}
}
Now we can call the method Show using the delegate as:
public delegate void MyDelegate(string message); //declare delegate
now we need to create the object of the delegate with the address of the method as:
DelegateDemo obj = new DelegateDemo();//class object
MyDelegate md= new MyDelegate(obj.Show(“Hello World!!”));
md(); // call the delegate
We can create the events and event handler by using delegate with the below syntax:
public delegate void textChangedEventHandler(Object sender, TextEventArgs e);
This event handler will be used to handle the textbox text changed event.
We can get more details about the delegate and events from the below link:
http://msdn.microsoft.com/en-in/library/orm-9780596521066-01-17.aspx


9. What is polymorphism? What are the types of polymorphism and how they are implemented?
Ans. Polymorphism is to use the same function in many forms. The polymorphism is of 2 types-
a. Classical polymorphism (Overloading)
b. AdHoc polymorphism (Overriding)
When the runtime (CLR) find the behavior of class members at the runtime of the program, it is called as the AdHoc polymorphism or Overriding.in this the method name is same but they are implemented in the different class. We use virtual keyword in the base class method to be overrides in the child class using the override keyword.
e.g.
public class MyClass
{
Public int Add(int a, int b)
{
Return a+b;
}
Public int Add(int a, int b, int c)
{
Return a+b+c;
}
}
When the runtime (CLR) find the behavior of class members at the compilation of the program, it is called as the Classical polymorphism or Overloading.in this the method name is same but there prototypes (parameters) are different and it is implemented in the same class.
e.g.
Public class MyBaseClass
{
Public virtual void Show(string message)
{
Console.WriteLine(“Your message is : ”+ message);
}
}
Public class MyChildClass: MyBaseClass
{
public override void Show(string message)
{
Console.WriteLine(“Your new message is : ”+ message);
}
}

10. Difference between exe and dll.
Ans. Exe(Executable) is the executable file which can be run standalone without support of any other file. It contains the self-executable information so it doesn’t need any external file or program to execute.
Dll(Dynamic Link Library) is the file which is not self-executable. It needs to be executed inside some other file. It is used to support the other dll’s or exe files.
11.Types of assemblies
Ans. In .net, there are mainly 3 types of assemblies:
• Private Assembly
• Shared Assemblies
• Satellite Assemblies
12. Is public static void Main() method available in console based applications/Windows/Web applications?
Ans. public static void Main() method is available in the Console application where this is the starting point of the console to be executed. The execution of the program starts from the Main() method.

13.A dll in GAC and a dll on a network which one is secure and why?
Ans. A dll in GAC is more secure and the most important is that in GAC, we can keep multiple versions of the dll which are having the same name while in the network we can’t keep the same name with multiple version files. So whenever there is the requirement to share the dll’s, always keep it in GAC instead of in a sharing folder in the network.
WPF
1. Difference between MVVM pattern and n-tier architecture.
Ans. MVVM(Model View View-Model) is one of the latest patters which is having the 3 layers-Model, View and View-Model
This is the latest design pattern to develop the application mainly in Silverlight applications or WPF application. The main advantages of using this Design patterns is that it’s layers are totally independent to each other. The Model doesn’t know about the View, View doesn’t now about the View-Model and Vice Versa.
So the layers are not tightly binded to each other. If we modify in one of the layer, we need not to modify the other layers. Application developed in MVVM model, is testable without the View.
In Case of3-tier application, all the 3 layers (Application Layer, Business Logic layer and Data Access layer) are tightly bounded to each other. So if there are any changes in any of the layer, we need to modify the other layers accordingly. All the layers are tightly bounded and dependent to each other so maintainability is difficult. We can’t test the application without the UI.
2. Advantages of using MVVM pattern
• The actual data is not stored in the View as View is only for the presentation of the data.
• The code is easily testable without using the View. The maintenance is quite easy as the layers are not dependent to each other.
• Layers are loosely coupled so maintenance is easy.
3. Have you used PRISM in your project?
Ans. No.
Hope it will be helpful to all the members.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: