Hello,
I have the following code:
DirectoryInfo pdfDirectory = new DirectoryInfo(@ "..\Documents") ;
var files = from f in pdfDirectory.Ge tFiles("*.pdf")
select new { Filename =
Path.GetFileNam eWithoutExtensi on(f.FullName) };
gvFiles.DataSou rce = files;
gvFiles.DataBin d();
XDocument doc = XDocument.Load( @"..\Documents\ FARList.xml");
var matches = from employees in doc.Descendants ("employee")
select new { Name =
(string)employe es.Attribute("n ame"), FileName =
(string)employe es.Attribute("f ilenameprefix") };
gvXML.DataSourc e = matches;
gvXML.DataBind( );
I want to find the intersection between these on FileName, but when I do
var finalresult = matches.Interse ct(files);
the compiler complains that the type arguments for the method cannot be
inferred.
I am not sure what I am missing?
Any help would be greatly appreciated. Thanks in advance.
--mitch
I have the following code:
DirectoryInfo pdfDirectory = new DirectoryInfo(@ "..\Documents") ;
var files = from f in pdfDirectory.Ge tFiles("*.pdf")
select new { Filename =
Path.GetFileNam eWithoutExtensi on(f.FullName) };
gvFiles.DataSou rce = files;
gvFiles.DataBin d();
XDocument doc = XDocument.Load( @"..\Documents\ FARList.xml");
var matches = from employees in doc.Descendants ("employee")
select new { Name =
(string)employe es.Attribute("n ame"), FileName =
(string)employe es.Attribute("f ilenameprefix") };
gvXML.DataSourc e = matches;
gvXML.DataBind( );
I want to find the intersection between these on FileName, but when I do
var finalresult = matches.Interse ct(files);
the compiler complains that the type arguments for the method cannot be
inferred.
I am not sure what I am missing?
Any help would be greatly appreciated. Thanks in advance.
--mitch
Comment