FileInfo[] filedetails = dir.GetFiles("*.swf");
By putting debug point make sure that you are getting filedetails.
courses.Add(new Course(FI.Name, FI.Length,FI.LastAccessTime));
For this make sure your
Class Course
having
constructor
with three args,
and also you have used
public property
for those parameters,
So that it can be accessed and inside the
constructer
you are initializing the value of those
parameter
so that it doesn't get
NULL
values.
Please
vote and
Accept Answer if it Helped.