Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: protect my database connection string Pin
tarasn18-Jan-06 21:05
tarasn18-Jan-06 21:05 
AnswerRe: protect my database connection string Pin
OldDog.Net18-Jan-06 14:47
OldDog.Net18-Jan-06 14:47 
AnswerRe: protect my database connection string Pin
LongRange.Shooter18-Jan-06 18:01
LongRange.Shooter18-Jan-06 18:01 
GeneralRe: protect my database connection string Pin
Sasuko19-Jan-06 4:49
Sasuko19-Jan-06 4:49 
QuestionDynamically adding ActiveX controls Pin
pyro_3k18-Jan-06 12:04
pyro_3k18-Jan-06 12:04 
AnswerRe: Dynamically adding ActiveX controls Pin
Judah Gabriel Himango18-Jan-06 12:51
sponsorJudah Gabriel Himango18-Jan-06 12:51 
GeneralRe: Dynamically adding ActiveX controls Pin
pyro_3k18-Jan-06 14:34
pyro_3k18-Jan-06 14:34 
Questionproblem when starting application automatically Pin
hvtin18-Jan-06 10:59
hvtin18-Jan-06 10:59 
GeneralRe: problem when starting application automatically Pin
Guffa18-Jan-06 11:28
Guffa18-Jan-06 11:28 

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.