i have a code like this
public static Dictionary<int, List<Monitor>> AddItemsFromDatabaseToCacheObject(Dictionary<int, List<Monitor>> valueListsByKey, DateTime lastInsertedTimeStamp)
{
var newItemsList = new SqlMonitorProvider().GetAllMonitorItems(lastInsertedTimeStamp);
if (newItemsList.Count > 0)
{
foreach (var item in newItemsList)
{
List<Monitor> valueList = new List<Monitor>();
if (valueListsByKey.ContainsKey(item.performanceCounterId))
{
valueListsByKey[item.performanceCounterId].Add(item);
}
else
valueList.Add(item);
valueListsByKey.Add(item.performanceCounterId, valueList);
}
}
return valueListsByKey;
}i want to make the Dictionary valueListsByKey argument nullable. I was thinking of overloading this method but is there any way to make it nullable so that i can pass a null to it?