点击或拖拽改变大小

SoftBasicCalculateFileMD5 方法

获取文件的md5码
Get the MD5 code of the file

命名空间:  HslCommunication.BasicFramework
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public static string CalculateFileMD5(
	string filePath
)

参数

filePath
类型:SystemString
文件的路径,既可以是完整的路径,也可以是相对的路径 -> The path to the file

返回值

类型:String
Md5字符串
示例
下面举例实现获取一个文件的md5码
CalculateFileMD5示例
try
{
    string md5 = SoftBasic.CalculateFileMD5( "D:\\123.txt" );

    Console.WriteLine( md5 );
}
catch(Exception ex)
{
    Console.WriteLine( "failed : " + ex.Message );
}
参见