473,503 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ISerializable on value types

I noticed this wierd problem when implementing ISerializable for a value
type.
The MSDN documentation (and FxCop) say The GetObjectData method should be
marked with [SecurityPermissionAttribute(SecurityAction.Demand,
SerializationFormatter=true)]
(http://www.gotdotnet.com/team/fxcop/...jectData.html).

When I mark my value type's GetMethodData method with the above CAS
deleration I get a wierd SEHException during serialization.
Without the above CAS decleration, serialization\deserialization runs
fine...

Reference types on the other hand work fine with the above CAS
decleration...

Any idea why this is happening?

Eran Kampf
http://www.ekampf.com

Jul 21 '05 #1
0 977

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

Similar topics

0
2160
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...
1
7069
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...
9
9325
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...
7
1277
by: Eran Kampf | last post by:
I noticed this wierd problem when implementing ISerializable for a value type. The MSDN documentation (and FxCop) say The GetObjectData method should be marked with ...
3
8055
by: Frans Bouma | last post by:
Hi, I have a serious problem with VB.NET and a DataTable derived class and I can't figure out how to solve it. I have implemented it in C# where it works perfectly, but I can't port one...
1
3369
by: herc | last post by:
Here is what MSDN says about the constructor that is needed when implementing the ISerializable interface: "The ISerializable interface implies a constructor with the signature constructor...
0
2763
by: j.askey | last post by:
Hi, I have a class that is inherited from Panel. Because Panel is not serializable, I have implemented the ISerializable interface on this class and I can sucessfully save and load classes from...
2
3119
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...
3
1257
by: Rene | last post by:
OK, I give up, the msdn help for custom serialization: http://msdn2.microsoft.com/en-us/library/ty01x675(VS.90).aspx Hs the following paragraph on it: ----- In addition, you should not use...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7087
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...
0
7281
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,...
0
7334
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...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
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...
0
5579
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,...
0
4675
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...
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.