Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

foreach statement cannot operate on variables of type 'Diary_Entry'

$
0
0

Passing in a list of dates 'DiaryEntry' through the foreach loop. every date that it records will be highlighted on the calendar....

foreach (DateTime d in DiaryEntry)
            {
                Calendar1.SelectedDates.Add(d);//CALENDAR1 being the ID of the calendar on the aspx page
            }
ERROR: foreach statement cannot operate on variables of type 'Diary_Entry' because 'Diary_Entry' does not contain a public defination for 'GetEnumerator'

Anyone have any idea how I can resolve this? Thanks


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>