public override bool Equals(object obj) { MyFile otherFile = obj as MyFile; if (otherFile == null) { return(false); } return(otherFile.filePath == this.filePath); }
public static bool IsFileInfected(MyFile MyFile) { bool value = false; if (MyFile.FileSize == MalwareSize) { return(value = true); } return(value); }
public static bool IsFileInfected(MyFile myFile) { if (myFile.FileSize == _IsInfected) { return(true); } else { throw new InfectedFileDetectedException("File is Infected with Virus", myFile.FilePath); return(false); } }
public int CompareTo(object obj) { MyFile mf = obj as MyFile; if (mf != null) { return(this.Size.CompareTo(mf.Size)); } else { throw new Exception("Not possible to compare!"); } }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj is MyFile == false) { return(false); } MyFile otherFile = obj as MyFile; return(this.FilePath == otherFile.FilePath); }
public int CompareTo(object obj) { MyFile newFile = obj as MyFile; return(this.FileSize - newFile.FileSize); }
public static bool IsFileInfected(MyFile f) => f.Size == MyMalwareSize;