You are an enterprise application developer. You are developing a component for a smart client application. The component will be accessed simultaneously by user interface threads and background threads. The threads must be able to access component properties and methods. The threads must not leave the component in an invalid state. You need to select an appropriate mechanism to ensure valid component state. What should you do?
A.
Implement the asynchronous design pattern.
B.
Implement a MarshalByRefObject object.
C.
Implement a SynchronizationContext object.
D.
Implement the component, and use locks when you access the component data.