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

What r collections c sharp?

3 Answers  


What is private variable?

0 Answers  


Explain streamreader/streamwriter class?

0 Answers  


Trace the O/p for a program on inheritance and Polymorphism. 3 classes A,B,C A with two methods public virtual SomeMethodA public virtual SomemoreMethodA B:A overide virtual SomeMethodA C:B new Method SomeMethodA override SomeMoreMethodA main method { b new instance of B b.SomeMethodA b.SomeMoreMethodA b1 new instance of C b1.SomeMethodA b1.SomeMoreMethodA }

1 Answers  


In a C# class we have a SortedList member m_addinProjects we want to provide an iterator to allow the consumer of this class access to the items in the collection. Please provide an iterator method for the AnalyzeAddinsDLL class below and an example of how it would be used. namespace AnalyzeAddinsDLL { public class AllAddInProjects { private SortedList<string, AddInProject> m_addinProjects; public AllAddInProjects() { m_addinProjects = new SortedList<string, AddInProject>(); } } }

0 Answers   ABC, WinsIndia,


Explain About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.

0 Answers  


What is the difference between “constant” and “readonly” variables in c#?

0 Answers  


What I can do with c#?

0 Answers  


What is dependency in software?

0 Answers  


What is the advantage of generics in c#?

0 Answers  


What is cosole application?

0 Answers  


What is the best dependency injection c#?

0 Answers  


Categories