Handing a multidimensional Array as parameter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SmVucw==?=

    #1

    Handing a multidimensional Array as parameter

    Hi,

    I have a multidimensiona l Array (2 dimensions). I'd like to hand that over
    to another function (respective another thread in another class, but that
    should be the same, shouldn't it?).

    Part of the calling function:
    Dim StatCreator As New Statistik(Datei _Inhalt())

    And the destination class:
    Public Class Statistik

    Dim Array()() As String

    Public Sub New(ByVal MeinArray()() As String)
    Array = MeinArray.Clone
    End Sub

    Problem: syntax. It won't let me do ...new Statistik(Datei _Inhalt()()... nor
    Datei_Inhalt or anything else I've tried.

    Does anyone know how that works?
  • =?Utf-8?B?SmVucw==?=

    #2
    RE: Handing a multidimensiona l Array as parameter

    Great, thanks a lot! :-)

    Comment

    • tommaso.gastaldi@uniroma1.it

      #3
      Re: Handing a multidimensiona l Array as parameter

      Hi jens,

      you should probably read the difference about jagged and
      multidimensiona l arrays.

      there is a lot on the web. for instance:
      Resources from the authors, creators, innovators, & leaders of technology - home to leading publishers Addison-Wesley Professional, & Sams.


      Jens ha scritto:
      Hi,
      >
      I have a multidimensiona l Array (2 dimensions). I'd like to hand that over
      to another function (respective another thread in another class, but that
      should be the same, shouldn't it?).
      >
      Part of the calling function:
      Dim StatCreator As New Statistik(Datei _Inhalt())
      >
      And the destination class:
      Public Class Statistik
      >
      Dim Array()() As String
      >
      Public Sub New(ByVal MeinArray()() As String)
      Array = MeinArray.Clone
      End Sub
      >
      Problem: syntax. It won't let me do ...new Statistik(Datei _Inhalt()()... nor
      Datei_Inhalt or anything else I've tried.
      >
      Does anyone know how that works?

      Comment

      Working...