473,385 Members | 1,838 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,385 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 12 '05 #1
0 1251

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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.