Click here to Skip to main content
16,016,022 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Making a programming language in VB Pin
Member 837869112-Mar-12 21:47
Member 837869112-Mar-12 21:47 
GeneralRe: Making a programming language in VB Pin
Simon_Whale12-Mar-12 23:14
Simon_Whale12-Mar-12 23:14 
AnswerRe: Making a programming language in VB Pin
Bernhard Hiller9-Mar-12 2:26
Bernhard Hiller9-Mar-12 2:26 
AnswerRe: Making a programming language in VB Pin
Bert Mitton9-Mar-12 7:40
professionalBert Mitton9-Mar-12 7:40 
AnswerRe: Making a programming language in VB Pin
Johan Hakkesteegt12-Mar-12 1:56
Johan Hakkesteegt12-Mar-12 1:56 
QuestionMultiple Keys Combination using Select Case Pin
Midnight Ahri8-Mar-12 19:47
Midnight Ahri8-Mar-12 19:47 
AnswerRe: Multiple Keys Combination using Select Case Pin
Richard MacCutchan8-Mar-12 21:34
mveRichard MacCutchan8-Mar-12 21:34 
QuestionSerializer complex class Pin
boagrius8-Mar-12 13:42
boagrius8-Mar-12 13:42 
Hello can anyone help me to serializer a class with a complex property


I can't serialize a class that contains this property

VB
Public Property DTOCarrito() As IList(Of DTOCompraCarritoX)
    Get
        If _DTOCarritoList.Count = 0 Then
            If CuponIngresado.Trim.Length = 0 Then
                CuponIngresado = String.Empty
                DTOCuponDetalle = Nothing
            End If
        End If

        Return _DTOCarritoList
    End Get
    Set(ByVal value As IList(Of DTOCompraCarritoX))
        _DTOCarritoList = value
    End Set
End Property


I can serialize fine without this property, but when I add the property and try to serialize I get this message "error reflecting type '. DTOCompraX'." DTCompraX is the main class name.

This is the code to serialize

VB
Dim dt As DTOCompraX
Dim dtc As DTOCompraCarritoX
Dim DTOclist As IList(Of DTOCompraCarritoX)
Dim dtp As DTOTipoProducto

dtc = New DTOCompraCarritoX()
dtp = New DTOTipoProducto()
DTOclist = New List(Of DTOCompraCarritoX)

Dim extraTypes(1) As Type
extraTypes(0) = dtc.GetType()
extraTypes(1) = DTOclist.GetType()

dt = New DTOCompraX()

Dim ot As Type
ot = dtc.GetType()

Dim fs As FileStream = New FileStream("c:\miobjeto.xml", FileMode.Create)

Dim xs As XmlSerializer = New XmlSerializer(dt.GetType(), extraTypes)
xs.Serialize(fs, dt)

fs.Close()</pre>



Thank you.
AnswerRe: Serializer complex class Pin
Bernhard Hiller8-Mar-12 22:17
Bernhard Hiller8-Mar-12 22:17 
QuestionModules don't like Overloading Pin
Clark Kent1237-Mar-12 8:43
professionalClark Kent1237-Mar-12 8:43 
AnswerRe: Modules don't like Overloading Pin
Eddy Vluggen7-Mar-12 11:10
professionalEddy Vluggen7-Mar-12 11:10 
AnswerRe: Modules don't like Overloading Pin
Simon_Whale7-Mar-12 11:28
Simon_Whale7-Mar-12 11:28 
QuestionRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 1:35
professionalClark Kent1238-Mar-12 1:35 
AnswerRe: Modules don't like Overloading Pin
Simon_Whale8-Mar-12 1:49
Simon_Whale8-Mar-12 1:49 
GeneralRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 3:42
professionalClark Kent1238-Mar-12 3:42 
GeneralRe: Modules don't like Overloading Pin
Simon_Whale8-Mar-12 3:48
Simon_Whale8-Mar-12 3:48 
AnswerRe: Modules don't like Overloading Pin
Dave Kreskowiak7-Mar-12 11:59
mveDave Kreskowiak7-Mar-12 11:59 
QuestionRe: Modules don't like Overloading Pin
Clark Kent1238-Mar-12 1:31
professionalClark Kent1238-Mar-12 1:31 
AnswerRe: Modules don't like Overloading Pin
Dave Kreskowiak8-Mar-12 3:14
mveDave Kreskowiak8-Mar-12 3:14 
QuestionForce the vertical scrollbar down Pin
Brandon-X120007-Mar-12 2:39
Brandon-X120007-Mar-12 2:39 
AnswerRe: Force the vertical scrollbar down Pin
Dave Kreskowiak7-Mar-12 3:37
mveDave Kreskowiak7-Mar-12 3:37 
GeneralRe: Force the vertical scrollbar down Pin
Brandon-X120007-Mar-12 5:35
Brandon-X120007-Mar-12 5:35 
GeneralRe: Force the vertical scrollbar down Pin
Dave Kreskowiak7-Mar-12 7:05
mveDave Kreskowiak7-Mar-12 7:05 
QuestionHow to check the double vaue is "1.#QNAN"? Pin
lavate malllik6-Mar-12 22:03
lavate malllik6-Mar-12 22:03 
AnswerRe: How to check the double vaue is "1.#QNAN"? Pin
Simon_Whale6-Mar-12 22:57
Simon_Whale6-Mar-12 22:57 

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.