Click here to Skip to main content
15,916,463 members
Home / Discussions / C#
   

C#

 
AnswerRe: Access Multiple object using remoting Pin
LongRange.Shooter19-Jan-06 1:05
LongRange.Shooter19-Jan-06 1:05 
GeneralRe: Access Multiple object using remoting Pin
sohne19-Jan-06 1:40
sohne19-Jan-06 1:40 
QuestionConverting a string to a double Pin
hellamasta18-Jan-06 22:57
hellamasta18-Jan-06 22:57 
AnswerRe: Converting a string to a double Pin
Guffa18-Jan-06 23:03
Guffa18-Jan-06 23:03 
GeneralRe: Converting a string to a double Pin
hellamasta18-Jan-06 23:10
hellamasta18-Jan-06 23:10 
GeneralRe: Converting a string to a double Pin
hellamasta19-Jan-06 0:00
hellamasta19-Jan-06 0:00 
QuestionBackup and restore database SQL Server 2000 by coding C# Pin
tadung18-Jan-06 21:42
tadung18-Jan-06 21:42 
QuestionDatatable to Excel Pin
Sriharsha R18-Jan-06 20:47
Sriharsha R18-Jan-06 20:47 
AnswerRe: Datatable to Excel Pin
Kedar Potdar18-Jan-06 21:48
Kedar Potdar18-Jan-06 21:48 
GeneralRe: Datatable to Excel Pin
Sriharsha R20-Jan-06 2:05
Sriharsha R20-Jan-06 2:05 
QuestionMimicing Outlook To: TextBox Pin
DanielMoto18-Jan-06 20:26
DanielMoto18-Jan-06 20:26 
QuestionWhat is the maximum number of threads can be start from windows 2003 service Pin
Ankit Sgl18-Jan-06 20:21
Ankit Sgl18-Jan-06 20:21 
GeneralRe: What is the maximum number of threads can be start from windows 2003 service Pin
CWIZO18-Jan-06 20:37
CWIZO18-Jan-06 20:37 
AnswerRe: What is the maximum number of threads can be start from windows 2003 service Pin
nericson18-Jan-06 20:50
nericson18-Jan-06 20:50 
QuestionHow can i play live stream from nework with Media player? Pin
Divyang Mithaiwala18-Jan-06 20:04
Divyang Mithaiwala18-Jan-06 20:04 
Questionmoving data from a web service to Windows CE SQL Pin
LongRange.Shooter18-Jan-06 17:54
LongRange.Shooter18-Jan-06 17:54 
QuestionCasting an System.Object type to ArrayList Pin
Tony D. Abel18-Jan-06 14:41
Tony D. Abel18-Jan-06 14:41 
Good day all.

I am having a problem with casting a system.object type into a ArrayList.

I am deserializing a serialized SOAP object in the following code snippet:

public static object DeserializedSOAPFile(string filePath) <br />
{<br />
	IFormatter formatter;<br />
	FileStream fileStream = null;<br />
	Object SOAPObject = null;<br />
	<br />
	 fileStream = new FileStream( filePath, FileMode.Open,FileAccess.Read ); 			<br />
	 formatter = new SoapFormatter();<br />
	 SOAPObject = formatter.Deserialize( fileStream );<br />
	<br />
	if(fileStream != null)<br />
	 fileStream.Close();<br />
			<br />
	return SOAPObject ;<br />
}


They I need to cast it into an ArrayList to get the data. I am trying the following:

comboBoxSavedList = DeserializedSOAPFile( deserializationDataPath );<br />
<br />
ArrayList savedComboBoxes  = (ArrayList) comboBoxSavedList;


When using the watch view I can see my saved ArrayList data but the app throws an invalid cast exception.

Thank you in advance for any input to assist me in correcting this code.

"We succeed in enterprises which demand the positive qualities we possess, but we excel in those which can also make use of our defects."

Have a great coding day.

Regards,

Tony D. Abel
AnswerRe: Casting an System.Object type to ArrayList Pin
LongRange.Shooter18-Jan-06 17:56
LongRange.Shooter18-Jan-06 17:56 
QuestionDatabinding Pin
monrobot1318-Jan-06 14:16
monrobot1318-Jan-06 14:16 
Questionanimated gif in c# form Pin
Manu_8118-Jan-06 13:17
Manu_8118-Jan-06 13:17 
AnswerRe: animated gif in c# form Pin
Christian Graus18-Jan-06 17:56
protectorChristian Graus18-Jan-06 17:56 
GeneralRe: animated gif in c# form Pin
AB777118-Jan-06 18:05
AB777118-Jan-06 18:05 
Questionprotect my database connection string Pin
Sasuko18-Jan-06 13:01
Sasuko18-Jan-06 13:01 
AnswerRe: protect my database connection string Pin
Guffa18-Jan-06 13:42
Guffa18-Jan-06 13:42 
GeneralRe: protect my database connection string Pin
Sasuko18-Jan-06 13:48
Sasuko18-Jan-06 13:48 

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.