Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datatype conversion question

Status
Not open for further replies.

pink2070

Programmer
Jan 29, 2004
23
US
I have a small problem, I am trying to get the typing correct, I'm sure the solution is simple, so here's the problem:

Dim ff As clsFTP 'this is a class

Dim strArray() As String = ff.GetFileListMod

I am not able to assign strArray with ff.GetFileListMod, I receive the following error message:

Option Strict On disallows implicit conversions from 'System.Object' to '1-dimensional array of String'.

I already know that by disabling Option Strict my code will work, I am simply looking for the correct way to do it

Pink
 
is clsFTP a class that you wrote yourself?


Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
or perhaps this

Dim strArray() As String = directcast(ff.GetFileListMod,string())

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Thanks Chrissie for your recommendation I will try that!

Pink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top