This question is locked. New answers and comments are not allowed.
public class ScheduleViewDragDropBehavior : Telerik.Windows.Controls.ScheduleViewDragDropBehavior { public override IEnumerable<IOccurrence> ConvertDraggedData(object data) { if (DataObjectHelper.GetDataPresent(data, typeof(Appointment), false)) { return ((IEnumerable)DataObjectHelper.GetData(data, typeof(Appointment), false)).OfType<IOccurrence>(); } return base.ConvertDraggedData(data); } }
The following line of code is giving me an error:
return ((IEnumerable)DataObjectHelper.GetData(data, typeof(Appointment), false)).OfType<IOccurrence>();
This is the error:
System.Collections.IEnumerable does not contain a definition for 'OfType' and no extension method 'OfType' accepting a first argument of type 'System.Collections.IEnumerable' could be found (are you missing a using directive or an assembly reference?) C:\BRPlanner\BRP\Planner\ScheduleViewDragDropBehavior.cs 24 98 Planner
What do I need to do to create an extension method for 'OfTYpe'
Thank you.