473,657 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with ISerializable help file paragraph.

OK, I give up, the msdn help for custom serialization:

http://msdn2.microsoft.com/en-us/lib...75(VS.90).aspx

Hs the following paragraph on it:

-----
In addition, you should not use default serialization on a class that is
marked with the Serializable attribute and has declarative or imperative
security at the class level or on its constructors. Instead, these classes
should always implement the ISerializable interface.
-----

Why?? Could someone tell me PLEASE what a heck does this mean? Why would
having imperative security at the class level or on its constructors have
anything to do with nothing?? What kind of security is this thing talking
about?

Thank you.
Dec 18 '07 #1
3 1266


"Rene" wrote:
OK, I give up, the msdn help for custom serialization:

http://msdn2.microsoft.com/en-us/lib...75(VS.90).aspx

Hs the following paragraph on it:

-----
In addition, you should not use default serialization on a class that is
marked with the Serializable attribute and has declarative or imperative
security at the class level or on its constructors. Instead, these classes
should always implement the ISerializable interface.
-----

Why?? Could someone tell me PLEASE what a heck does this mean? Why would
having imperative security at the class level or on its constructors have
anything to do with nothing?? What kind of security is this thing talking
about?

Thank you.

My guess is that this is an obtuse way of describing that XML serialization
needs a public default constructor.
>
Dec 19 '07 #2
My guess is that this is an obtuse way of describing that XML serialization
needs a public default constructor.
True: xml serialization *does* need a default ctor, but ISerializable
is for binary serialization (IXmlSerializab le is for xml).

I don't claim to fully understand the paragraph myself - I'm just
trying to avoid a red herring...

Marc

Dec 19 '07 #3
Actually, ISerializable is not for binary serialization specifically,
but the serialization engine in System.Runtime. Serialization. This engine
will use reflection to get the internal members of a type, as opposed to Xml
serialization, which only works with the public members. Also, the
serialization engine in System.Runtime. Serialization supports multiple
formatters (soap, binary), whereas there is only one format for XML
Serialization.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Marc Gravell" <ma**********@g mail.comwrote in message
news:2d******** *************** ***********@y5g 2000hsf.googleg roups.com...
>My guess is that this is an obtuse way of describing that XML
serializatio n
needs a public default constructor.

True: xml serialization *does* need a default ctor, but ISerializable
is for binary serialization (IXmlSerializab le is for xml).

I don't claim to fully understand the paragraph myself - I'm just
trying to avoid a red herring...

Marc

Dec 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1276
by: Mike | last post by:
I need to have some links within an xml document to external pages. I have tried with the below xml and xsl documents(the proposed link has a tag called link under paragraph): XML: ---------------------------- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="rates.xsl"?> <rates> <pagetitle>Rates 2003/2004</pagetitle>
22
2556
by: Jeff Parker | last post by:
I have a web application that for the real estate industry. Here is one of the sites using said application. http://www.wellsre.com As you can see if you click this link here http://validator.w3.org/check?uri=http%3A%2F%2Fwww.wellsre.com This site validates just fine using the w3 validator
0
2168
by: Mike Pollett | last post by:
Hi, I have used the ISerializable interface before and the code below worked fine. Until I derived it from CollectionBase. The code will still serialize and deserialize the properties in this class and properties derived from this class but will not serialize or deserialize the properties in CollectionBase. Like InnerList, which is a read only property of CollectionBase. How can I serialize and deserialize the InnerList property of...
9
9337
by: Dave Veeneman | last post by:
I use binary serialization for file storage in an application I am creating. Right now, I'm using simple serialization with a attribute. Now, let's say I create a later version with a modified class structure. I'm planning to implement ISerializable and a SerializationBinder on my classes at that time to enable reading prior version files. Is it okay to defer implementing these items until they are actually needed? Is it a good idea? Or...
4
1286
by: Julia | last post by:
Hi, I have a EmailMessage and a UrgentMessage objects both derived from IMessage i also have BadMedia and GoodMedia objects both derived from IMedia GoodMedia:IMedia string Subject string Body BadMedia:IMedia
0
1145
by: a | last post by:
Hi, I am using a SoapFormatter to serialize a class which has a member that is derived from DictionaryBase. Everything works fine... I can serialize and deserialize. The trouble I have is that I need to implement versioning, so I have to implement the ISerializable interface and provide the GetObjectData function and the constructor to deserialize the object. When I try to deserialize the member that is derived from DictionaryBase, I...
1
1337
by: baroon | last post by:
thaaaaanxxxxxxxxxxxxx very much my friend for help but i hahe something also to help i have programe and i need someone to change it from c to c++ .please i should finish it befor tuesday please,,,,,,,,this is the programe ________________________________________________________________ /* Problem 0: Write a paragraph read from a file to the screen in a justified format, paragraph should end with . */ /* Include...
4
1443
by: baroon | last post by:
i need help please this program in c and ineed someone to change it in to c++ (change the format).please i need it as soon as u can before tuesday:) ____________________________________________________ /* Problem 0: Write a paragraph read from a file to the screen in a justified format, paragraph should end with . */ /* Include libraries */ #include <stdio.h> #include<iostream>
2
3131
by: RRB | last post by:
Hi, I have a class library in which I have classes which implement ISerializable. They all have GetObjectData implementations and constructors to support deserialization. In unit testing this library, I discovered that my classes were being serialized by XmlSerializer using the default behavior of traversing the public g/s properties.
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8622
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5647
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.