|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Array SyntaxI have an array of Object type
I want to assign to each element of the array a 2D String array so I tried to assign like this: = New String(2, 2) but the compiler assumes these are constructor parameter How can I achieve that? Samuel Samuel,
Include {} on the end on the string array initialization, something like: Dim mess(3) as Object mess(0) = New String(2, 2) {} mess(1) = New String(2, 2) {} mess(2) = New String(2, 2) {} mess(3) = New String(2, 2) {} -- Hope this helps Jay B. Harlow [MVP - Outlook] ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "Samuel Shulman" <samuel.shul***@ntlworld.com> wrote in message I have an array of Object typenews:ehR5EBJxGHA.4200@TK2MSFTNGP04.phx.gbl... I want to assign to each element of the array a 2D String array so I tried to assign like this: = New String(2, 2) but the compiler assumes these are constructor parameter How can I achieve that? Samuel Thank you,
Samuel Show quoteHide quote "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_***@tsbradley.net> wrote in message news:%23uquPHJxGHA.2352@TK2MSFTNGP06.phx.gbl... > Samuel, > Include {} on the end on the string array initialization, something like: > > Dim mess(3) as Object > mess(0) = New String(2, 2) {} > mess(1) = New String(2, 2) {} > mess(2) = New String(2, 2) {} > mess(3) = New String(2, 2) {} > > -- > Hope this helps > Jay B. Harlow [MVP - Outlook] > .NET Application Architect, Enthusiast, & Evangelist > T.S. Bradley - http://www.tsbradley.net > > > "Samuel Shulman" <samuel.shul***@ntlworld.com> wrote in message > news:ehR5EBJxGHA.4200@TK2MSFTNGP04.phx.gbl... > I have an array of Object type > > I want to assign to each element of the array a 2D String array so I tried > to assign like this: > = New String(2, 2) but the compiler assumes these are constructor > parameter > > How can I achieve that? > > Samuel > >
VoIP Dialer
Debug in .Net 2005 Invoking Class from a variable string in VB 2005...! WaitCursor and mouse locked in QueryContinueDrag best way to calculate transfer rate? Checklist box code help needed Get paid to post in forums.. Databinding a check list box Get paid to post in forums.. how to pass variable from one event to the other? |
|||||||||||||||||||||||