Click here to Skip to main content
14,741,581 members
Home » Discussions » C#
   

C#

 
GeneralRe: .Net 2.0 MailTo Tag Pin
GDesai204-Aug-08 7:13
MemberGDesai204-Aug-08 7:13 
QuestionButterfly Flight Pin
DFlat4Now30-Jul-08 11:08
MemberDFlat4Now30-Jul-08 11:08 
AnswerRe: Butterfly Flight Pin
Thomas Stockwell30-Jul-08 11:19
professionalThomas Stockwell30-Jul-08 11:19 
AnswerRe: Butterfly Flight Pin
jedliu204630-Jul-08 17:01
Memberjedliu204630-Jul-08 17:01 
Questionstoring data Pin
damianrda30-Jul-08 8:40
Memberdamianrda30-Jul-08 8:40 
AnswerRe: storing data Pin
TheFM23430-Jul-08 9:03
MemberTheFM23430-Jul-08 9:03 
AnswerRe: storing data Pin
led mike30-Jul-08 9:05
Memberled mike30-Jul-08 9:05 
AnswerRe: storing data Pin
damianrda30-Jul-08 11:00
Memberdamianrda30-Jul-08 11:00 
Ok, well i managed to serialize the object using a binaryformatter and then base64'd the result.

<br />
		public string Serialize()<br />
		{<br />
			MemoryStream MemStream = new MemoryStream();<br />
			BinaryFormatter Serializer = new BinaryFormatter();<br />
<br />
			Serializer.Serialize(MemStream, this);<br />
<br />
			return Encoding.ASCII.GetString(MemStream.ToArray()).ToBase64();<br />
		}<br />


but im having some issues when deserializing:
"End of stream encountered before parsing was completed."

<br />
		public static Address Deserialize(string SerializedData)<br />
		{<br />
			Address Address;<br />
			MemoryStream MemStream = new MemoryStream();<br />
			BinaryFormatter Serializer = new BinaryFormatter();<br />
<br />
			string Decoded = SerializedData.FromBase64();<br />
			byte[] Buffer = Encoding.ASCII.GetBytes(Decoded);<br />
			MemStream.Write(Buffer, 0, Buffer.Length);<br />
<br />
			Address = (Address)Serializer.Deserialize(MemStream); <-- fails right here...<br />
<br />
			return Address;<br />
		}<br />

GeneralRe: storing data [modified] Pin
Mark Salsbery30-Jul-08 12:30
MemberMark Salsbery30-Jul-08 12:30 
Questionown Printer service on c#.net Pin
balu1234530-Jul-08 8:30
Memberbalu1234530-Jul-08 8:30 
AnswerRe: own Printer service on c#.net Pin
vikas amin30-Jul-08 11:50
Membervikas amin30-Jul-08 11:50 
GeneralRe: own Printer service on c#.net Pin
vikas amin30-Jul-08 11:52
Membervikas amin30-Jul-08 11:52 
GeneralRe: own Printer service on c#.net Pin
balu1234531-Jul-08 0:31
Memberbalu1234531-Jul-08 0:31 
GeneralRe: own Printer service on c#.net Pin
vikas amin1-Aug-08 6:37
Membervikas amin1-Aug-08 6:37 
GeneralRe: own Printer service on c#.net Pin
vikas amin1-Aug-08 7:15
Membervikas amin1-Aug-08 7:15 
GeneralRe: own Printer service on c#.net Pin
vikas amin19-Aug-08 6:41
Membervikas amin19-Aug-08 6:41 
QuestionArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 7:30
MemberzeeShan anSari30-Jul-08 7:30 
AnswerRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 7:44
mveWendelius30-Jul-08 7:44 
GeneralRe: ArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 7:52
MemberzeeShan anSari30-Jul-08 7:52 
QuestionRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 7:54
mveWendelius30-Jul-08 7:54 
AnswerRe: ArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 8:09
MemberzeeShan anSari30-Jul-08 8:09 
GeneralRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 8:22
mveWendelius30-Jul-08 8:22 
GeneralRe: ArrayList ....Where is problem? Pin
Alaric_30-Jul-08 8:31
professionalAlaric_30-Jul-08 8:31 
GeneralRe: ArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 8:47
MemberzeeShan anSari30-Jul-08 8:47 
GeneralRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 8:58
mveWendelius30-Jul-08 8:58 

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.