title: VB function with multiple output - assignment of results
body: <p>I know there's no straightforward way for multiple assignment of function in <code>VB</code>, but there's my solution - is it good, how would you do it better?</p>
  
  <p>What I need (how would I do it in python, just an example)</p>
  
  <pre><code>def foo(a)    ' function with multiple output
      return int(a), int(a)+1
  
  FloorOfA, CeilOfA = foo(a) 'now the assignment of results
  </code></pre>
  
  <p>How I do it in VB:</p>
  
  <pre><code>Public Function foo(ByVal nA As Integer) As Integer() ' function with multiple output
      Return {CInt(nA),CInt(nA)+1}
  End Function
  
  Dim Output As Integer() = foo(nA) 'now the assignment of results
  Dim FloorOfA As Integer = Output(0)
  Dim CeilOfA As Integer = Output(1)
  </code></pre>