Click here to Skip to main content
15,898,993 members
Home / Discussions / C#
   

C#

 
GeneralRe: It Works! Pin
PIEBALDconsult22-May-10 8:18
mvePIEBALDconsult22-May-10 8:18 
QuestionC # Pin
Make Up Forever21-May-10 14:27
Make Up Forever21-May-10 14:27 
AnswerRe: C # Pin
Dr.Walt Fair, PE21-May-10 14:55
professionalDr.Walt Fair, PE21-May-10 14:55 
GeneralRe: C # Pin
Make Up Forever21-May-10 15:11
Make Up Forever21-May-10 15:11 
GeneralRe: C # Pin
AspDotNetDev21-May-10 15:31
protectorAspDotNetDev21-May-10 15:31 
GeneralRe: C # Pin
Dr.Walt Fair, PE21-May-10 15:34
professionalDr.Walt Fair, PE21-May-10 15:34 
AnswerRe: C # Pin
Wes Aday21-May-10 17:05
professionalWes Aday21-May-10 17:05 
QuestionError Icomparer interface - To sort FileInfo Pin
quanvt21-May-10 13:55
quanvt21-May-10 13:55 
Hi!
I'm testing the filecopier application to move, copy, delete...files from one directory to another directory. But when i write the nested class FileComparer in class frmFileCopier to compare 2 filelist, it has an error:
Error1 'FileCopier.Form1.FileComparer' does not implement interface member 'System.Collections.Generic.IComparer<System.IO.FileInfo>.Compare(System.IO.FileInfo, System.IO.FileInfo)'.

Anyone helps me?
Thanks

The code
public class FileComparer : IComparer<FileInfo>
      {

           public int Compare(FileInfo file1, FileInfo file2)
           {

            if ( file1.Length > file2.Length )
            {
               return -1;
            }
            if ( file1.Length < file2.Length )
            {
               return 1;
            }
            return 0;
         }

           public bool Equals(FileInfo x, FileInfo y) { 
             throw new NotImplementedException( ); 
           }
           public int GetHashCode(FileInfo x) {
             throw new NotImplementedException( ); 
           }
          }

AnswerRe: Error Icomparer interface - To sort FileInfo Pin
Luc Pattyn21-May-10 14:20
sitebuilderLuc Pattyn21-May-10 14:20 
AnswerRe: Error Icomparer interface - To sort FileInfo Pin
AspDotNetDev21-May-10 15:39
protectorAspDotNetDev21-May-10 15:39 
GeneralRe: Error Icomparer interface - To sort FileInfo Pin
quanvt21-May-10 17:43
quanvt21-May-10 17:43 
Question.TableName, why use that? Pin
mprice21421-May-10 11:10
mprice21421-May-10 11:10 
AnswerRe: .TableName, why use that? Pin
Pete O'Hanlon21-May-10 12:29
mvePete O'Hanlon21-May-10 12:29 
AnswerRe: .TableName, why use that? Pin
PIEBALDconsult21-May-10 14:29
mvePIEBALDconsult21-May-10 14:29 
GeneralRe: .TableName, why use that? Pin
mprice21421-May-10 14:53
mprice21421-May-10 14:53 
GeneralRe: .TableName, why use that? Pin
PIEBALDconsult21-May-10 15:21
mvePIEBALDconsult21-May-10 15:21 
GeneralRe: .TableName, why use that? Pin
mprice21422-May-10 4:00
mprice21422-May-10 4:00 
QuestionSingle Sign On question Pin
Etienne_12321-May-10 10:56
Etienne_12321-May-10 10:56 
AnswerRe: Single Sign On question Pin
Pete O'Hanlon21-May-10 12:24
mvePete O'Hanlon21-May-10 12:24 
GeneralRe: Single Sign On question Pin
Etienne_12321-May-10 13:00
Etienne_12321-May-10 13:00 
GeneralRe: Single Sign On question Pin
Pete O'Hanlon21-May-10 23:49
mvePete O'Hanlon21-May-10 23:49 
GeneralRe: Single Sign On question Pin
Etienne_12324-Jun-10 1:38
Etienne_12324-Jun-10 1:38 
GeneralRe: Single Sign On question Pin
Etienne_12315-Jul-10 23:50
Etienne_12315-Jul-10 23:50 
QuestionPurpose of Web Service Namespaces Pin
AspDotNetDev21-May-10 10:29
protectorAspDotNetDev21-May-10 10:29 
AnswerRe: Purpose of Web Service Namespaces Pin
Pete O'Hanlon21-May-10 12:34
mvePete O'Hanlon21-May-10 12:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.