title: Passing in an object as an out parameter
body: <p>I have a method that checks for validity of an object with respect to my program (some algorithm). The object is created(parsed) from a string that is passed in. </p>
  
  <p>The logic is:</p>
  
  <pre><code> bool isValid(String str, out Object obj)
      {
           obj = null;
           obj = new Object(str); //Validation happens during the object creating
           if(obj.Legit) //Don't mind this line :)
               return true;
           return false;
      }
  </code></pre>
  
  <p>And I call this validation from another class, which if this validation fails, does a different validation (same method)</p>
  
  <pre><code>void FindingObjectType(String str)
  {
          if(isValid(str, out ??????)
               //process
  }
  </code></pre>
  
  <p>So instead of ?????, I don't know how to pass the object. </p>
  
  <p>I have only 1 constructor, Object(String).</p>