public Thread CalcHash(string filepath, HashCallback callback) { Thread th = new Thread(() => { byte[] hash = new byte[32]; if (!fileHash(filepath, hash)) { callback?.Invoke(null); return; } callback?.Invoke(hash); }); th.Start(); return(th); }