title: Select the max,min of nested lists vb.net
body: <p>I have these objects</p>
  <pre><code>Public Class Class1
          Public Property Type As String
          Public Property SpecLimits As Limits
      End Class
  
      Public Class Limits
          Public Property MinValue As Double?
          Public Property MaxValue As Double?
      End Class
  </code></pre>
  <p>I can have more <code>Type</code>-s with their <code>Speclimits</code> values. I need to find the maximum of MaxValue. I can make it with a <code>for each</code> to check every time which number is bigger, but I thought maybe their is some <code>linq</code> with what this could be achievable.
  I found something like this in <code>c#</code></p>
  <pre><code> var maxItem = emplist
  .Select((emp, index) =&gt; new 
  { 
      maxProject = emp.project
          .Select((proj, pIndex) =&gt; new{ proj, pIndex })
          .OrderByDescending(x =&gt; x.proj.ID)
          .First(),
      emp, index 
  })
  .OrderByDescending(x =&gt; x.maxProject.proj.ID)
  .First();
  </code></pre>
  <p>but I can't translate it to <code>vb.net</code>
  Any help is appreciated!</p>