Which of the following code segments will he place in MyMethod to accomplish this task?

Posted by: Pdfprep Category: GSSP-.NET Tags: , ,

George works as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. George creates an application using the .NET Framework.

He writes the following code snippet in the application:

public class FirstClass

{

public static int test=500;

}

public class SecondClass : FirstClass

{

public static void Main(String[] args)

{

SecondClass mb=new SecondClass();

mb.MyMethod();

}

public void MyMethod()

{

//Appropriate statement

}

}

George wants to modify the value of the test variable in MyMethod to 1000.

Which of the following code segments will he place in MyMethod to accomplish this task? Each correct answer represents a complete solution. Choose all that apply.
A . base.test=1000;
B . test=1000;
C . FirstClass.test=1000;
D . test=1000.00;

Answer: B,C

Leave a Reply

Your email address will not be published.