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.