Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27360

VS 2010 [RESOLVED] Diff btw

$
0
0
Code:


       
HTML Code:

       
Public Class Person
        Public personid As integer       
       
         Public Sub New(ByVal id As integer)
            Me.personid=id
        End Sub
End Class

 Public Class test
        Private obj() As Person

        Public Sub New(ByVal pArray() As Person)
            obj = New Person(pArray.Length - 1)

        End Sub

    End Class



In above code i m confusing in below line
Code:

obj = New Person(pArray.Length - 1)
because if i want to initialize 'person' class with constructor argument value =2 then we use same code line in case (pArray.Length - 1 =2)
and also if i want to assing obj variable to (array length -1) then use same code-line.
???

Viewing all articles
Browse latest Browse all 27360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>