title: How to check if column is exist in Linq join query c#?
body: <p>Hi I am running one Linq query to join three tables. below is the query...</p>
  
  <pre><code>answerText = ds.Tables[0];
  questionAvg = ds.Tables[1];
  interviews = ds.Tables[2];
  
  var data = from at in answerText.AsEnumerable()
             join qa in questionAvg.AsEnumerable() on at.Field&lt;int&gt;("ID") equals qa.Field&lt;int&gt;("DealerID")
             join inter in interviews.AsEnumerable() on at.Field&lt;int&gt;("ID") equals inter.Field&lt;int&gt;("DealerID")
             select new
             {
                 DealerID = at.Field&lt;int&gt;("ID"),
                 DealerName = at.Field&lt;string&gt;("Name"),
                 AnswerText1 = at.Field&lt;int?&gt;("12"),                           
                 AnswerText2 = at.Field&lt;int?&gt;("8"),
                 AnswerText3 = at.Field&lt;int?&gt;("4"),
                 AnswerText4 = at.Field&lt;int?&gt;("0"),
                 AnswerText5 = at.Field&lt;int?&gt;("-4"),
                 Rank = qa.Field&lt;Int64?&gt;("Rank"),
                 Average = qa.Field&lt;decimal?&gt;("Average"),
                 N = inter.Field&lt;int?&gt;("N")
             };
  </code></pre>
  
  <p>now sometimes answerText datatable will only have column 12 and 8.., so it is missing columns 4 0 -4. how should i avoid that column check in above query and just provide 0 there. </p>