Tutorials
Resources
Forum
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
My Profile
Sign In
Register
AdSense Revenue
Gifts
Active Members
Today
kanagarajum
(117)
Meetu Choudhar...
(111)
Vivek
(90)
Last 7 Days
Meetu Choudhar...
(758)
Appukuttan
(512)
Mari raj k
(443)
more...
Serializable Attribute
Posted Date: 03 Jun 2008 Resource Type:
Definitions
Category:
General
Posted By:
shakti singh tanwar
Member Level:
Diamond
Rating:
Points
: 5
In order for a class to be serializable, it must have the Serializable Attribute set and all its members must also be serializable, except if they are ignored with the attribute NonSerializedAttribute. However, the private and public members of a class are always serialized by default. The SerializationAttribute is only used for the binary serialization. The code snippet below shows the usage of SerializableAttribute.
[Serializable]
public class Employee
{
public int empCode;
public string empName;
}
The SerializableAttribute is useful for situations where the object has to be transported to other application domains. It needs to be applied even irrespective of whether the class implements the ISerializable interface. If this attribute is not set in that case, then when we try to serialize an object the CLR throws a SerializationException.
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
HybridDictionary Class
Previous Resource:
LINQ
Return to Discussion Resource Index
Post New Resource
Category:
General
Post resources and
earn money
!
Related Resources
Nullable Types
SQL Profiler
Visual Studio Team System
Clustered Index Vs Non Clusterd
AJAX
dotNet Slackers
BizTalk Adaptors
Web Design
budget conference call
Contact Us
Privacy Policy
Terms Of Use