class Employee
{

stat9c Method1()
static Method2(ref a)
stat9c Method3(out x)

}

class Employee
{

stat9c Method1()
static Method2(ref a)
stat9c Method3(out x)

}

what will happen & why?

Answers were Sorted based on User's Feedback



class Employee { stat9c Method1() static Method2(ref a) stat9c Method3(out x) } ..

Answer / sisira

it will give complie error bcoz same class name already
declare

Solution:
Make it both class Partial

Is This Answer Correct ?    1 Yes 0 No

class Employee { stat9c Method1() static Method2(ref a) stat9c Method3(out x) } ..

Answer / sisira

it will give complie error bcoz same class name already
declare

Solution:
Make it both class Partial

and stat9c is not key word
please make it static.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Explane each and every methods of nterface Queue? Explain About performance issues on retrieving records

1 Answers   DELL,


What is _viewstart cshtml?

1 Answers  


Integer at long type variable are not object.Support your answer with example.And explain the technique to convert from value type to reference type and vice-versa.

1 Answers   HCL,


Why do we need constructors?

1 Answers  


What is the difference between virtual method and abstract method?

1 Answers  


Use of Checked and UnChecked operators?

2 Answers   TCS,


Can enum be null c#?

1 Answers  


what is the real use of interface in c#,other than that multiple inheritance is not possible

7 Answers  


f i give input like 1,1,4,5,6,1,2,5,4,1,2, then output should be like : 1-4, 2-2, 4-2, 5-1, 6-1 which means 1 occurs 4 times, 2 occurs 2 times like so.

7 Answers  


Is and as keyword in c# net?

1 Answers  


What is null propagation c#?

1 Answers  


Can constructor be overloaded in c#?

1 Answers  


Categories