S
Sudip_inn
Guest
i have stored list of period in List<string> but when finding by linq then getting null
List<string> columnType = dt.Columns.Cast<DataColumn>().Select(y=> y.ToString()).ToList();
var found = columnType.Where(a => a.Contains("H") && a.Contains("Q")).FirstOrDefault();
if (found != null)
{
tickerType = "QUARTERHALFYEARLYANNUAL";
return tickerType;
}
first store all the column names into List<string> and after that i am searching column that if any data has H in its name and Q ?
getting null but there are columns like 1Q 2010, 2Q 2010, 1H 2010, 2H 2010, 2010 FY etc.
what is wrong in my approach ?
Continue reading...
List<string> columnType = dt.Columns.Cast<DataColumn>().Select(y=> y.ToString()).ToList();
var found = columnType.Where(a => a.Contains("H") && a.Contains("Q")).FirstOrDefault();
if (found != null)
{
tickerType = "QUARTERHALFYEARLYANNUAL";
return tickerType;
}
first store all the column names into List<string> and after that i am searching column that if any data has H in its name and Q ?
getting null but there are columns like 1Q 2010, 2Q 2010, 1H 2010, 2H 2010, 2010 FY etc.
what is wrong in my approach ?
Continue reading...