Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any special code to be used for implementing marshaling in C#
Posted

Yes.
Next!

Marshaling is the process of "packaging" and "unpackaging" datatypes so they can be passed between managed (.NET) and unmanaged (native) code. That said, it's not trivial, and it's easy to get wrong with catastrophic results.
There is no "special code" that will work for all data in all circumstances - it has to be designed and organised so that it works in each specific case.
Start here: https://msdn.microsoft.com/en-us/library/eaw10et3(v=vs.110).aspx[^] And then try google - which has a lot of info on the subject.
 
Share this answer
 
Comments
Member 10752313 27-Nov-15 5:48am    
Thank you, I got an idea of its usage.
OriginalGriff 27-Nov-15 6:03am    
You're welcome!
Marshaling is a process of transforming or serializing data from one application domain and exporting it to another application domain.

There are two types of Marshaling:

Marshal by value: a copy of an object is created by the server and is passed and used by the client.
Marshal by reference: the client creates a proxy to access the object.

http://www.c-sharpcorner.com/uploadfile/GemingLeader/marshaling-with-C-Sharp-chapter-2-marshaling-simple-types/[^]
 
Share this answer
 
Comments
Member 10752313 27-Nov-15 5:48am    
Thank you, I got an idea of its usage.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900