SqlServer的校验和在C# [英] SqlServer Checksum in C#

查看:138
本文介绍了SqlServer的校验和在C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用SQL Server 2008 R2中的chechsum功能,我想获得在C#应用程序相同的INT值。
是否有在C#中的任何等同方法,返回像SQL校验功能的价值?
感谢名单

I'm using the chechsum function in sql server 2008 R2 and I would like to get the same int values in a C# app. Is there any equivalent method in c# that returns the values like the sql checksum function? Thanx

推荐答案

校验文档没有披露如何它计算哈希值。如果你想要一个散列你可以在T-SQL和C#中使用,从的 HASHBYTES

CHECKSUM docs don't disclose how it computes the hash. If you want a hash you can use in T-SQL and C#, pick from the algorithms supported in HashBytes

这篇关于SqlServer的校验和在C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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