Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Serialization Gremlin

Serialization Gremlin

Scheduled Pinned Locked Moved Visual Basic
xmljsonhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tom John
    wrote on last edited by
    #1

    Hey Guys Try this:

    Public Class TestClass

    Public A As Integer = 100
    Public ASpecified As Boolean
    

    End Class

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim ser As New System.Xml.Serialization.XmlSerializer(GetType(TestClass))
        Dim ms As New IO.MemoryStream
    
        ser.Serialize(ms, New TestClass)
        MsgBox(System.Text.ASCIIEncoding.UTF8.GetString(ms.ToArray))
    

    End Sub

    Then try changing ASpecified to Integer. There seems be a problem with serializable methods/fields that end with the word Specified, can anyone else confirm that I'm not going round the bend... it's been an afternoon of pulling what little hair I have out tracking it down! Cheers Tom

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups