title: Is there a good C# design pattern for parsing strings that when split have different amounts of data?
body: <p>I am dealing with values delimited by commas sent to me as a string. The strings come in many different structures (meaning different data types in different locations of the string as well as varying amounts of data). So while one string might be represented as:</p>
  
  <p><strong>- common data,identifier,int,string,string,string.</strong></p>
  
  <p>Another might be represented as:</p>
  
  <p><strong>- common data,identifier,int,int,string,string,string.</strong></p>
  
  <p>Design goals:</p>
  
  <ul>
  <li>Common parse method</li>
  <li>Common validation (i.e. int.TryParse() returns true)</li>
  <li>Readily able to add different structures</li>
  </ul>
  
  <p>Is there a good design pattern, or combination of design patterns, that allows me to parse the values, check them, and return an object only if the right amount of values were pulled in and those values were the expected data types?</p>
  
  <p><strong>Note:</strong> I am dealing with more than 30 different string structures.</p>