title: Reduce Cyclomatic complexity while processing DataRows
body: <p>I have the following piece of code which checks if a particular DataRow has a column of a particular name and if it is not NULL.</p>
  
  <pre><code>private static bool HasValue(DataColumn c, DataRow row)
  {
       if (c != null &amp;&amp; row != null &amp;&amp; row[c.ColumnName] != System.DBNull.Value)
       {
           return true;
       }
       return false;
  }
  </code></pre>
  
  <p>Also I am processing the columns of a datarow and parsing it into corresponding datatypes.</p>
  
  <pre><code>foreach (DataColumn c in row.Table.Columns)
  {
       switch (c.ColumnName)
       {
       case Constants.Literals.ACTIVATIONDATETIME:
                                  if (HasValue(c, row))
                                  {
                                      bFound = true; credentialInfo.ActivationDateTime = DateTimeOffset.Parse(Convert.ToString(row[c.ColumnName]));
                                  }
                                  break;
       }
  }
  </code></pre>
  
  <p>Visual Studio shows this as cyclomatically complex. Is there any way to reduce the cyclomatic index on this function.</p>