Click here to Skip to main content
15,913,154 members
Home / Discussions / C#
   

C#

 
GeneralRe: Login Pin
Heath Stewart6-Oct-04 12:34
protectorHeath Stewart6-Oct-04 12:34 
GeneralRe: Login Pin
pat2708817-Oct-04 7:38
pat2708817-Oct-04 7:38 
GeneralRe: Login Pin
pat2708817-Oct-04 7:43
pat2708817-Oct-04 7:43 
Generalsetting datagrid cursors Pin
ddelapasse6-Oct-04 4:01
ddelapasse6-Oct-04 4:01 
Question.NET OLAP control? Pin
jvbragt6-Oct-04 2:29
jvbragt6-Oct-04 2:29 
AnswerRe: .NET OLAP control? Pin
Christian Wikander6-Oct-04 3:36
Christian Wikander6-Oct-04 3:36 
GeneralRe: .NET OLAP control? Pin
jvbragt6-Oct-04 3:59
jvbragt6-Oct-04 3:59 
Generalserialization problem Pin
ongo6-Oct-04 1:53
ongo6-Oct-04 1:53 
Hi I have simple class

[Serializable]<br />
	public class Siren	: IDataSourceItem<br />
	{<br />
		uint		        _id;<br />
		string			_Name;<br />
		int			_InventoryNumber;<br />
		string			_SirenType;<br />
		string			_LocationStreet;<br />
		string			_LocationNumber;<br />
		string			_Remark;<br />
		DateTime		_LastDiagnostic;<br />
		DateTime		_NextDiagnostics;<br />
        .<br />
        .<br />
        .<br />
        .<br />
        .<br />
        .<br />
        }


and I have collection of classes of this type

[Serializable]<br />
	public class SirenGroup :  System.Collections.CollectionBase,IDataSourceItem<br />
	{<br />
		public SirenGroup(){}<br />
<br />
		public int Add(Siren siren)<br />
		{<br />
			return this.InnerList.Add(siren);<br />
		}<br />
<br />
		public void Insert(int index,Siren siren)<br />
		{<br />
			InnerList.Insert(index,siren);<br />
		}<br />
<br />
		public void Remove(Siren siren)<br />
		{<br />
			InnerList.Remove(siren);<br />
		}<br />
<br />
		public new void RemoveAt(int index)<br />
		{<br />
			InnerList.RemoveAt(index);<br />
		}<br />
         .<br />
         .<br />
         .<br />
         }


when I serialize this object evrything seems OK

BinaryFormatter binaryFormatter = new BinaryFormatter();<br />
   System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(100);<br />
   <br />
			   <br />
   try<br />
   {<br />
	binaryFormatter.Serialize(memoryStream,sirenGroup);<br />
   }<br />
   catch (System.IO.IOException exc)<br />
   {<br />
	Utilities.WriteLog.WriteError(exc);<br />
   }


when I deserialize it

try<br />
{<br />
   System.Type typeObjectType = typeof(Definitions.SirenGroup) ;<br />
  if(typeObjectType.IsSerializable)<br />
  object sirenGroup = <br />
            System.Convert.ChangeType(binaryFormatter.Deserialize(memoryStream),typeObjectType);<br />
}<br />
catch (System.Runtime.Serialization.SerializationException exc)<br />
{<br />
	Utilities.WriteLog.WriteError(exc);<br />
}


I get an error : stream ended before analysis was finished
Could anybody please tell me wat can produce this error.
Thank You

Salut!
GeneralRe: serialization problem Pin
J4amieC6-Oct-04 2:26
J4amieC6-Oct-04 2:26 
GeneralRe: serialization problem Pin
ongo6-Oct-04 2:42
ongo6-Oct-04 2:42 
GeneralConvert base64String to byte[] in CrystalReport Pin
Pain_Elemental6-Oct-04 1:41
Pain_Elemental6-Oct-04 1:41 
GeneralRe: Convert base64String to byte[] in CrystalReport Pin
Alex Korchemniy6-Oct-04 7:56
Alex Korchemniy6-Oct-04 7:56 
GeneralGUI from Windows Service Pin
Jo Develper6-Oct-04 1:22
Jo Develper6-Oct-04 1:22 
GeneralRe: GUI from Windows Service Pin
Stefan Troschuetz6-Oct-04 1:30
Stefan Troschuetz6-Oct-04 1:30 
GeneralUsing C# dll in vb6 Pin
Zapss6-Oct-04 0:27
Zapss6-Oct-04 0:27 
GeneralRe: Using C# dll in vb6 Pin
Stefan Troschuetz6-Oct-04 1:10
Stefan Troschuetz6-Oct-04 1:10 
GeneralRe: Using C# dll in vb6 Pin
Steve Maier6-Oct-04 6:44
professionalSteve Maier6-Oct-04 6:44 
GeneralHeight of Font Pin
sachinkalse5-Oct-04 22:32
sachinkalse5-Oct-04 22:32 
GeneralRe: Height of Font Pin
Christian Wikander5-Oct-04 22:45
Christian Wikander5-Oct-04 22:45 
GeneralRe: Height of Font Pin
sachinkalse6-Oct-04 0:17
sachinkalse6-Oct-04 0:17 
GeneralMDI Child form starts off without titlebar widgets Pin
benjymous5-Oct-04 22:26
benjymous5-Oct-04 22:26 
GeneralMake a component appear on the form at design time Pin
Christian Wikander5-Oct-04 22:18
Christian Wikander5-Oct-04 22:18 
GeneralRe: Make a component appear on the form at design time Pin
Hadi Fakhreddine6-Oct-04 0:06
Hadi Fakhreddine6-Oct-04 0:06 
GeneralRe: Make a component appear on the form at design time Pin
Christian Wikander6-Oct-04 0:36
Christian Wikander6-Oct-04 0:36 
Questionhow to handle a mass of lables in C#? Pin
momer5-Oct-04 22:17
momer5-Oct-04 22:17 

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.