PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a Windows-based application named MyWinApp. To the application, you add a Windows Form named MyForm and a reference to a SingleCall .NET Remoting object named TheirObject.
You need to ensure that MyForm creates an instance of TheirObject to make the necessary remote object calls.

Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
RemotingConfiguration.RegisterActivatedClientType(
typeof(TheirObject),
“http://TheirServer/TheirAppPath/TheirObject.rem”);
TheirObject theirObject = new TheirObject();

B.
RemotingConfiguration.RegisterWellKnownClientType(
typeof(TheirObject),
“http://TheirServer/TheirAppPath/TheirObject.rem”);
TheirObject theirObject = new TheirObject();

C.
RemotingConfiguration.RegisterActivatedServiceType(
typeof(TheirObject));
TheirObject theirObject = new TheirObject();

D.
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(TheirObject),
“http://TheirServer/TheirAppPath/TheirObject.rem”,
WellKnownObjectMode.Singleton);
TheirObject theirObject = new TheirObject();


Leave a Reply