public static bool IsVolumeEmpty(string deviceID, out Exception ex) { bool isEmpty = false; ManagementObject win32Volume = BitlockerUtil.GetWin32Volume(deviceID, out ex); if (win32Volume != null) { win32Volume.GetPropertyValue("Name").ToString(); ex = Util.HandleExceptions(delegate { long num = Convert.ToInt64(win32Volume.GetPropertyValue("Capacity").ToString()) - Convert.ToInt64(win32Volume.GetPropertyValue("FreeSpace").ToString()); if (num <= 524288000L) { isEmpty = true; } }); } return(isEmpty); }