public override bool Equals(object obj) { CameraConfig config = obj as CameraConfig; if (config == null) { return(false); } if (config.Index != Index || config.RegionOfInterest != RegionOfInterest) { return(false); } return(true); }