Sunday, 27 July 2014

Interview Questions

If you are struggling to get placed in a reputed organization but not able to get through the ugly and tough interviews then try below questions and find yourself sipping coffee and relaxing in cafeteria of big brands like Infosys, IBM, Wipro, RBS and so on. Lets not waste much time dreaming and get directly to questions.

Q1: Define Static Members in C#
A1:If an attributes value had to be same across all the instances of the same class , static keyword is used. For example if the Minimum salary should be set for all employees in the employee class, use the following code
private static double MinSalary = 30000;
For static members only single memory space will be shared by all instances. When to use static member depends upon the requirement If there are certain values that needs to be same across all instances i.e that doesn't depends upon the particular instance/user like web config keys, utilities values, logging details etc  for this we can use static members.

Monday, 14 July 2014

Project not selected to build for this solution configuration


You can create several build configurations for a solution. For example, you can configure a debug build that your testers/developer can use to find and fix problems, and you can configure different kinds of builds that you can distribute to different customers. 

When you upgrade your older solution files to latest version of visual studio 2010 or 2012 you may get compilation output as "Project not selected to build for this solution configuration", even though with the earlier version of visual studio these projects were building fine. 

 In order to build required project you just have to modify the solution configuration. Steps below mention how to do it.