J'ai la fonction suivanteImpossible de convertir implicitement le type
public Dictionary<DateTime, object> GetAttributeList(
EnumFactorType attributeType,
Thomson.Financial.Vestek.Util.DateRange dateRange)
{
DateTime startDate = dateRange.StartDate;
DateTime endDate = dateRange.EndDate;
return (
//Step 1: Iterate over the attribute list and filter the records by
// the supplied attribute type
from assetAttribute in AttributeCollection
where assetAttribute.AttributeType.Equals(attributeType)
//Step2:Assign the TimeSeriesData collection into a temporary variable
let timeSeriesList = assetAttribute.TimeSeriesData
//Step 3: Iterate over the TimeSeriesData list and filter the records by
// the supplied date
from timeSeries in timeSeriesList.ToList()
where timeSeries.Key >= startDate && timeSeries.Key <= endDate
//Finally build the needed collection
select timeSeries);
}
Error:Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<System.Collections.Generic.Dictionary<System.DateTime,object>>'
to 'System.Collections.Generic.Dictionary<System.DateTime,object>'.
An explicit conversion exists (are you missing a cast?)
en C# 3.0
Merci de fournir une réponse non absurde. +1 – leppie