What should you do to create the SimpleMathClass class?

A Windows service application must host a .NET Framework remoting class named SimpleMathClass.
SimpleMathClass must have the following method, which can be called remotely.

public double Add(double x, double y)
{
return x + y;
}

You need to create the SimpleMathClass class.

What should you do?

A Windows service application must host a .NET Framework remoting class named SimpleMathClass.
SimpleMathClass must have the following method, which can be called remotely.

public double Add(double x, double y)
{
return x + y;
}

You need to create the SimpleMathClass class.

What should you do?

A.
Write the following class definition.
public class SimpleMathClass : MarshalByRefObject
{
public double Add(double x, double y)
{
return x + y;
}
}

B.
Write the following class definition.
[AutomationProxy(true)]
public class SimpleMathClass
{
public double Add(double x, double y)
{
return x + y;
}
}

C.
Write the following class definition.
[Serializable]
public class SimpleMathClass
{
public double Add(double x, double y)
{
return x + y;
}
}

D.
Write the following class definition.
public class SimpleMathClass : ServicedComponent
{
public double Add(double x, double y)
{
return x + y;
}
}



Leave a Reply 0

Your email address will not be published. Required fields are marked *