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

Explain the advantage of using system.text.stringbuilder over system.string?

0 Answers  


Can I fly with a loop recorder?

0 Answers  


Can you create partial delegates and enumerations?

0 Answers  


What is datatable and dataset in c#?

0 Answers  


What is class and object c#?

0 Answers  






What Happens In Memory When You Box And Unbox A Value-type?

0 Answers   Siebel Systems,


How do you restrict the type which can be used in custom generic?

1 Answers   IBM,


What is difference between an reference type and value type in C#?

0 Answers   B-Ways TecnoSoft,


What is a streamwriter in c#?

0 Answers  


Which is faster hashtable or dictionary?

0 Answers  


Explain the types of Polymorphism.

0 Answers   Accenture,


What does console readline do?

0 Answers  


Categories