Click here to Skip to main content
16,006,475 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionI'm Bolding Pin
medicenpringles25-Sep-05 10:43
medicenpringles25-Sep-05 10:43 
AnswerRe: I'm Bolding Pin
medicenpringles26-Sep-05 5:46
medicenpringles26-Sep-05 5:46 
QuestionLoad Boot.ini to RichTextBox Pin
andyr200525-Sep-05 10:04
andyr200525-Sep-05 10:04 
AnswerRe: Load Boot.ini to RichTextBox Pin
rwestgraham25-Sep-05 11:23
rwestgraham25-Sep-05 11:23 
GeneralRe: Load Boot.ini to RichTextBox Pin
andyr200525-Sep-05 11:44
andyr200525-Sep-05 11:44 
GeneralRe: Load Boot.ini to RichTextBox Pin
rwestgraham25-Sep-05 12:16
rwestgraham25-Sep-05 12:16 
GeneralRe: Load Boot.ini to RichTextBox Pin
andyr200525-Sep-05 12:35
andyr200525-Sep-05 12:35 
QuestionDeserialization Problem Pin
THEMYTH25-Sep-05 9:37
THEMYTH25-Sep-05 9:37 
Hi all,


I have a serialization class with following procedures.


Public Shared Sub Serialize(ByVal Obj As Object, ByVal FilePath As String)
Dim fs As New FileStream(FilePath, FileMode.OpenOrCreate)
Dim sf As New SoapFormatter
sf.Serialize(fs, Obj)
fs.Close()
End Sub
Public Shared Sub DeSerialize(ByRef Obj As Object, ByVal FilePath As String)
Dim fs As New FileStream(FilePath, FileMode.Open)
Dim sf As New SoapFormatter
Obj = sf.Deserialize(fs)
fs.Close()
End Sub

As it can be guessed, these methods are used for serializing and deserializing objects.

I have a class to be serialized

<serializable()> public class SampleClass

Private Value as Integer
Private Items As New ArrayList

end Class

When I serialize this class, the output will be shown like the data below.
(That shows the class has been successfully serialized)


(PLEASE IGNORE THE NAMES AND VALUES IN THE DATA - IT IS ONLY A SAMPLE)
.....
......
<arraylist_x002b__version>6

<soap-enc:array id="ref-5" soap-enc:arraytype="xsd:anyType[16]">
<item href="#ref-6">
<item href="#ref-7">
<item href="#ref-8">
<item href="#ref-9">
<item href="#ref-10">
<item href="#ref-11">

<a5:uniqueentity id="ref-6" xmlns:a5="http://schemas.microsoft.com/clr/nsassem/PDPweb.Entities/PDPweb%2C%20Version%3D1.2.2094.37416%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_Name id="ref-12">ID
<entity_x002b__type>UniqueIdentifier
<entity_x002b__required>true
<entity_x002b__check xsi:null="1">
......
......(continues)...

But when I try to deserialize a class (from the data file), only the
"Private Value as Integer" variable is deserialized.

How can I also deserialize an arraylist?



Best Regards
Emre YAZICI
QuestionControl Word in OLE Pin
cop125-Sep-05 5:31
cop125-Sep-05 5:31 
QuestionSave Query &quot;Image&quot; problem Pin
bl@ck_rose25-Sep-05 2:44
bl@ck_rose25-Sep-05 2:44 
AnswerRe: Save Query &quot;Image&quot; problem Pin
cop125-Sep-05 3:35
cop125-Sep-05 3:35 
QuestionRe: Save Query &quot;Image&quot; problem Pin
bl@ck_rose25-Sep-05 3:46
bl@ck_rose25-Sep-05 3:46 
AnswerRe: Save Query &quot;Image&quot; problem Pin
cop125-Sep-05 5:13
cop125-Sep-05 5:13 
QuestionQuestion on set text in combo box Pin
cop125-Sep-05 2:38
cop125-Sep-05 2:38 
AnswerRe: Question on set text in combo box Pin
jo0ls25-Sep-05 6:57
jo0ls25-Sep-05 6:57 
QuestionExcel sheet Pin
ybasha25-Sep-05 0:10
ybasha25-Sep-05 0:10 
AnswerRe: Excel sheet Pin
cop125-Sep-05 4:34
cop125-Sep-05 4:34 
AnswerRe: Excel sheet Pin
cop12-Oct-05 18:45
cop12-Oct-05 18:45 
QuestionDetectig in an application is loaded Pin
subscr2224-Sep-05 23:01
subscr2224-Sep-05 23:01 
AnswerRe: Detectig in an application is loaded Pin
jo0ls25-Sep-05 7:03
jo0ls25-Sep-05 7:03 
AnswerRe: Detecting if an application is loaded Pin
subscr2225-Sep-05 13:36
subscr2225-Sep-05 13:36 
Questiondatagrid Pin
dap_qk24-Sep-05 22:17
dap_qk24-Sep-05 22:17 
AnswerRe: datagrid Pin
_mubashir25-Sep-05 23:58
_mubashir25-Sep-05 23:58 
QuestionRuntime Error Pin
24-Sep-05 21:56
suss24-Sep-05 21:56 
QuestionIPC Pin
kaln24-Sep-05 21:05
kaln24-Sep-05 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.