For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > November 2004 > String Array as function return....









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author String Array as function return....
Ram Achar

2004-11-30, 8:58 pm

Can I get string array (single dimension) as function return parameter?

I am developing ASP.Net application using VB.Net in .Net Framework 1.1.

Thanks,

Ram


Kevin Spencer

2004-11-30, 8:58 pm

You can return any single object as a function return value. An array is an
object.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Ram Achar" <RamAchar24@hotmail.com> wrote in message
news:#aCuX7x1EHA.936@TK2MSFTNGP12.phx.gbl...
> Can I get string array (single dimension) as function return parameter?
>
> I am developing ASP.Net application using VB.Net in .Net Framework 1.1.
>
> Thanks,
>
> Ram
>
>



Travis Murray

2004-11-30, 8:58 pm

Sure. Try something like this:

Public Function Foo() as String()
Dim bar As String = {"bar1","bar2","bar3"}
Return bar
End Function

Travis Murray
MCSD, MCT
Artiem Consulting, Inc.
http://www.artiem.com
Learn ASP.Net In Jamaica in 2005!
Visit http://www.artiem.com/jamaica.aspx for more details.


"Ram Achar" <RamAchar24@hotmail.com> wrote in message
news:%23aCuX7x1EHA.936@TK2MSFTNGP12.phx.gbl...
> Can I get string array (single dimension) as function return parameter?
>
> I am developing ASP.Net application using VB.Net in .Net Framework 1.1.
>
> Thanks,
>
> Ram
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com