
What is an Object?
Object is an instance of a class.
What is an Instance?
Memory which is reserved for the contents of exe file (which is present in the Hard Disk) in RAM at run time
Ex: Hello h = new Hello();
Serialization is the process of taking an object and converting it to a format in which it can be transported across a network or persisted to a storage location.
Deserialization is the process of using the serialized state information to reconstruct the object from the serialized state to its original state.
How to make a class serializable?
Add the [Serializable] attribute in front of the class' definition.
[Serializable]
public class Store
{
private int sCount;
[NonSerialized] private int temp;
}
What Is Remoting?
Remoting is a means by which one operating system process, or program, can communicate with another process. The two processes can exist on the same computer or on two computers connected by a LAN or the Internet. Communicating between two programs may seem like a big "so what," but it's a rather involved process.
Remoting Terminology
Remotable Objects
Marshalling Choices
MBV vs MBR

Writing Serializable Components
[Serializable]
public class SampleRemoteObject2
{
}
// function that returns a Serializable object
public SampleRemoteObject2 GetFun()
{
}
MarshalByRef objects:
To make an object remotable, simply derive it from MarshallByRefObject
public class SampleRemoteObj: MarshalByRefObject
{
}
Activation Choices
Remoting Server
The following can all act as Remoting Servers..
Remoting Client
How Does Remoting Work?

Local Proxy Object

Formatter Sink

Transport Sink

Transport Sink - Server

Formatter Sink - Server

Dispatcher

Threading
Process: The memory space, where a given application is executed is called - process. A Process is the memory set aside for an application to be executed in. Within this process the thing, which is really executed is the thread. The operation system allocates CPU's time to the thread. So a process contains at least one thread but the process can contain many threads, which can be executed "simultaneously" by sharing the CPU.
Thread:So a thread is the compound unit of a process, which the operating system allocates CPU's time to. A process always has at least one thread running, but it also can have many threads running, which share the CPU's time.
Single threaded versus Multi threaded application
For example if the application consists of only one thread and there is an operation which can take much time such as requesting data from a remote server. The CPU will send the request to the server and wait for the response. This can result in much idle time and the user will have to wait without doing anything else. On the other hand if the application uses more than one thread, the operation of requesting data from a remote computer can fire a new thread, and the running one will still be on focus, allowing the user to perform what action wants, while the request and data travel.
Methods for creating threads in .NETThere are two methods for creating threads in a .NET application:
Synchronization
Synchronization is the process of ensuring that only one thread can access a given Resource at a time. There are many ways of synchronizing thread and two of them are through Monitor class and lock keyword.