1
Vote

Unable to cast object of type 'System.Reflection.RtFieldInfo' to type 'System.Reflection.PropertyInfo'.

description

Unable to cast object of type 'System.Reflection.RtFieldInfo' to type 'System.Reflection.PropertyInfo'.
 
 
this works..
var sheets = from s in book.Worksheets
                             where s.Name == strSheetName.ToString()
                             select s;
 
where this does not...
 
var sheets = from s in book.Worksheets
                             where s.Name == strSheetName
                             select s;
 
 
error is at line 148 of XlsWorksheet.cs
-------return Expression.Property(Rebuild(mexpr.Expression), (PropertyInfo)member);

comments