Min and max from list collection
<p>How can I get the min value ad max value from this example</p>

<pre><code>Public Class RowsFound
    Property RowIndex As integer
    Property Qty As Integer
    Property LineValue As Double
End Class
Dim Test as new List(Of RowsFound)
</code></pre>

<p>above you can see the structure to my list. This is what the data would look like. 
<a href="https://i.stack.imgur.com/ztcqP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ztcqP.jpg" alt="enter image description here"></a></p>

<p>What would be the best way to get the RowIndex based on max LineValue and RowIndex of Min LineValue</p>

<p>I have done this as a test but would like to see if there a better way of doing this.</p>

<pre><code>                        Dim MaxRow As Integer = 0
                        Dim MaxRowValue As Integer = 0
                        Dim MinRow As Integer = 999999
                        Dim MinRowValue As Integer = 999999
                        For Each MinMaxitem As RowsFound In ListOfRows
                            If MinMaxitem.LineValue &lt; MinRowValue Then
                                MinRow = MinMaxitem.RowIndex
                                MinRowValue = MinMaxitem.LineValue
                            End If
                            If MinMaxitem.LineValue &gt; MaxRowValue Then
                                MaxRow = MinMaxitem.RowIndex
                                MaxRowValue = MinMaxitem.LineValue
                            End If
                        Next
</code></pre>

<p>Thank you :)</p>