View Single Post
  #1 (permalink)  
Old November 9th, 2008, 06:44 AM
dpkbahuguna dpkbahuguna is offline
Friend of Wrox
 
Join Date: Jan 2006
Location: Hardwar, Uttranchal, India.
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default FileInfo Arrya Contains Property

Hello friends,

     I have a FIleInfo collection and I want to search a particular file in this collection but I am unable to get the result...

     I am doing something like this please tell what I am doing wrong here my code is here below:

    In this code there are tow values are coming in FileInfo Ccollection and I have to search anyone according to condition

========================================
          var Qry = from x in FI where (x.ToString().ToLower()).StartsWith(fname.ToLower( )) select x;

        FileInfo RowTextFile = new FileInfo("FIleName.txt");

        FileInfo[] fileName = Qry.ToArray<FileInfo>();

//this FILENAME>TXT is available into FileInfo array so this IF CONTDITION should return TRUE value but condition returning FALSE.
        if(fileName.Contains<FileInfo>(RowTextFile))
    {
        dosomething;
    }
=================================

thanks in advance!!


DPK..
__________________
DPK..