Hi,
I've got a really dumb and probably very simple question to answer.
I've serialized a class and am passing it between other classes (see below). Is there a way *other than what I have done* so that when control is return to Main, the output is what it should be (see the comments).
Ideally, I'd set in class 2 for Main to be able access the information.
Thanks
Paul
...
Search Result
Collapse
9 results in 0.0042 seconds.
Keywords
Members
Tags
-
Sanitizing XML of serialized objects
For a webservice I use this code to serialize the response:
Dim XmlizedString As [String] = Nothing
Dim memoryStream As New MemoryStream()
Dim xs As New XmlSerializer(p Object.GetType)
Dim xmlTextWriter As New Xml.XmlTextWrit er(memoryStream , System.Text.Enc oding.UTF8)
xs.Serialize(xm lTextWriter, pObject)
memoryStream = DirectCast(xmlT extWriter.BaseS tream, MemoryStream)
Dim r As Byte() = memoryStream.To Array()... -
Serialization happening in Debug mode but not in Run mode
Hi,
I have written a script task in SSIS which serializes a list of class having properties. Issue I am facing is the code runs fine in Debug mode and writes the XML file with data, but executes without writing XML in run mode.
Also tested the same code in VS 2008 and works well in both Debug and Run.
Please help.Language is VB.NET -
EARNEST started a topic How to change the way the Vector2 is presented in a file upon serialization?in C SharpHow to change the way the Vector2 is presented in a file upon serialization?
Hello,
Current output result when I serialize my asset's class in XNA is of the following form:
Code:<?xml version="1.0" encoding="utf-8"?> <XnaContent xmlns:Game_Entities="HPC_AsteroidGame.Game_Entities"> <Asset Type="Game_Entities:GameEntity"> <ListOfSprites /> <Center>0 0</Center> <Position>0 0</Position>
-
Serialization adds some wierd characters "d3p1:" to return string
A third party web service method returns an object which we try to serialize into a string. When I use the following method to serialize the object, I see some text "d3p1:", "d4p1" prefixed with each tag and attribute. What is this and why does it add these characters?
Code:public static string SerializeObject(Object pObject) { MemoryStream memoryStream = new MemoryStream(); XmlSerializer xs
-
Error in XML serialization for TypeForwardedTo classes
When an object is serialized, the framework creates a .cs program file in the /Windows/Temp directory and tries to compile it with a cmdline (freshly created everytime) which is present in .cmdline file in the same path. The cmdline tries to compile the .cs program using csc.exe with appropriate reference paths included and the output file and path to store the output.
Does anyone know based on what the references in the cmdline are... -
Why Do we need Serialization?
Hi there, just digging into serialization a few questions about serialization.
1. Why do we need serialization?
Ans: For transferring the objects or saving the objects in database or file etc.
But why to serialize inorder to transfer the file? We can directly transfer the file if we create the class in separate .cs file and directly send the file to the person required.
2. Where do we implement serialization?
...Last edited by Niheel; Aug 24 '10, 06:25 PM. -
Regarding Serialization in .net
Hi there,
I am just a learner in .net . I am presently learning serialization in .net by my own.Just a quick question.
When we serialize any class using serializable attribute, the whole class gets serialized right?
Consider this code
Code:[Serializable] public class Store { private int sCount; public int stockCount { get { return sCount;
-
punitsinghi started a topic DeSerialization doesn’t work though i Implement GetObjectData method and Constructorin .NETDeSerialization doesn’t work though i Implement GetObjectData method and Constructor
Hi,
I have a static generic dictionary in a class. As static memeber cannot serialized so i have implented ISerializable interface and method GetObjectData to serialize. I have a constructor which will also accept SerializationIn fo and StreamingContex t to deserliaze the dictionay. Now when i try to serialize and deserialize , it always return 1(thoug i added 2 entries). please find the pseduo code-
Code:[Serializable]
Last edited by tlhintoq; Aug 3 '09, 05:41 PM. Reason: [CODE] ...your code goes here... [/CODE] tags added