title: How can fix it Unity2017 port project Unity 4.x
body: <p>How can fix this error that occurs when trying to port a Unity 4.x project to Unity2017?</p>
  
  <blockquote>
    <p>Error CS0177: The out parameter `result' must be assigned to before control leaves the current method</p>
  </blockquote>
  
  <pre><code>public bool TryDequeue(out T result)
  {
      Node&lt;T&gt; curHead;
      Node&lt;T&gt; curTail;
      Node&lt;T&gt; next;
      do
      {
          curHead = _head;
          curTail = _tail;
          next = curHead.Next;
          if (curHead == _head)
          {
              if (next == null)
              {
                  result = default(T);
                  return false;
              }
              if (curHead == curTail)
              {
                  Interlocked.CompareExchange&lt;Node&lt;T&gt;&gt;(ref _tail, next, curTail); 
              }
              else
              {
                  result = next.Item; 
                  if (Interlocked.CompareExchange&lt;Node&lt;T&gt;&gt;(ref _head, 
                      next, curHead) == curHead)
                      break;
              }
          }
      }
      while (true);
      return true;
  }
  </code></pre>