检查文件是否损坏 [英] Check if file is corrupted

查看:141
本文介绍了检查文件是否损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了Windows Mobile应用程序,但有一个数据库文件损坏的情况.所以我想以编程方式检查数据库文件是否已损坏?我该如何在c#

I developed windows mobile application, i have a case that the database file corrupted. so i want to check programmatically if database file is corrupted ?? how can i do it in c#

推荐答案

中做到这一点,您需要先定义已损坏".最合乎逻辑的事情是尝试从数据库中获取数据,如果成功,您是否认为它没有损坏?还是您需要遍历所有数据以检查此内容?进行此操作的方式取决于对rupture的定义.
You need first to define ''corrupted''. The most logical thing is to try to get data from the DB, if that succeeds, do you regard it as not corrupted ? Or do you need to iterate over all your data to check this ? The way you do this depends on your definition of corrupt.


这篇关于检查文件是否损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆