473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

serializa a class without public field or public prop setters

Is that possible?

Hi all, (let's start with that),

as usual i do not have enough time to dive into this, so i'm directing
this question to u guys (him/her).
We have a messagenamespace with quite an amount of messages which we
use to have some interaction between the various layers. The messages
have, of course, the same format, which will be presented below:

<format>
Namespace BussinessTypes

<Serializable()> _
Public Class Response_Gegevens_Organisatie
Inherits PVOResponseBericht

#Region "Fields"
Private _naam As SimpleTypes.Naam
Private _soort As SimpleTypes.Rol
#End Region

#Region "Constructors"
Public Sub New(ByVal info As SerializationInfo, ByVal context
As StreamingContext)
MyBase.New(info, context)
End Sub

Public Sub New( _
ByVal naam As SimpleTypes.Naam, _
ByVal soort As SimpleTypes.Rol)

MyBase.New(Enums.MessageTypes.Request_Gegevens_Org anisatie)
_naam = naam
_soort = soort
End Sub

Public Sub New()
MyBase.New(Enums.MessageTypes.Response_Gegevens_Or ganisatie)
End Sub

#End Region

#Region "Properties"
Public Readonly Property Soort() As SimpleTypes.Rol
Get
Return _soort
End Get
End Property
...... etc.
</format>
Using the above format we don't have public fields, nor do we have
public setters in the class-properties.

Is it possible to serialize this object (maybe with the
SerializationInfo-class) or do we have to create public setters (which
takes 2 days).

Thx in advance

grtz,

Mark
Nov 22 '05 #1
0 622

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

Similar topics

50
by: Dan Perl | last post by:
There is something with initializing mutable class attributes that I am struggling with. I'll use an example to explain: class Father: attr1=None # this is OK attr2= # this is wrong...
0
by: Mark | last post by:
Is that possible? Hi all, (let's start with that), as usual i do not have enough time to dive into this, so i'm directing this question to u guys (him/her). We have a messagenamespace with...
11
by: JustSomeGuy | last post by:
I have a structure typedef struct { string a; string b; } atype; string ABC = ("123"); string DEF = ("456");
12
by: Manolis | last post by:
Hi, I was wondering if there is any way to make two objects of the same class to be able to access each other's private data, like this: class A { public: void access( const A& a )...
17
by: Mark | last post by:
uhhmmm... not really sure how to word this. i cant get get this to compile.. i'm not sure what the proper syntax to do this is.. hopefully it's self explanatory. here's my class: ------ class...
24
by: downwitch | last post by:
Hi, I know this has been covered here and in the .public groups, but it seems like it's been a while, especially around here, so I just thought I'd ask again to see if anyone has figured out a...
2
by: Mythran | last post by:
System.Drawing.SystemColors is a class with all static properties. Here is what my short-ranged goal is... I want to enumerate all of the SystemColors properties and print the name (using...
5
by: Bryan | last post by:
I have a class 'TagType' with an ilist member 'Props' that holds a collection of another class called 'Prop'. I let the user create TagTypes and save multiple properties (Props) in them. I am...
1
by: sk.rasheedfarhan | last post by:
Hi , I am using C# I am having 4 classes. like below. public class A { String m_strRuleName; String m_strRuleGuid; // Some member functions. public Object NextItem; }
5
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, I am using XML serialization for the first time and I have noticed something unexpected. The object I am serializing contains a field private NumericSettings _numericSettings; public...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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,...

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.