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

Any .net training centers available near hitech city , hyderabad?

2 Answers  


How would you describe encapsulation in c#?

0 Answers  


may we achieve polyphormsm through overloading a funtion?Is it right or wrong concept because i read polyphormism can be achieved through overloading?plz help me thnks

1 Answers  


When would you use generics in your code c#?

0 Answers  


Who is a accessibility modifier “protected internal” available to ?

0 Answers   Siebel,






Define c# and list the features.

0 Answers  


Define boxing and unboxing in c#?

0 Answers  


Why dictionary is used in c#?

0 Answers  


what is the default access for a class

0 Answers   Cognizant,


explain the three services model commonly know as a three-tier application.

0 Answers   Siebel Systems,


What is file extension of webservices?

0 Answers  


what is diffrence between protected ,internal and protected internal?? whether protected field available in derived class which is outside the assembly. if not ..this is possible by which access modifiers??

2 Answers  


Categories