string问题 C# string的GetHashCode是怎么实现的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), SecuritySafeCritical]public override unsafe int GetHashCode(){ fixed (char* str = ((char*) this)) { char* chPtr = str; int num = 0x15051505; int num2 = num; int* numPtr = (int*) chPtr; for (int i = this.Length; i > 0; i -= 4) { num = (((num << 5) + num) + (num >> 0x1b)) ^ numPtr[0]; if (i <= 2) { break; } num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ numPtr[1]; numPtr += 2; } return (num + (num2 * 0x5d588b65)); }} C/S结构,使用WEB SERVICE,客户端登陆问题 判断窗体个数! 关于AsyncCallback委托? 为什么要请求权限? 关于GridView绑定后根据显示的字段状态去判断是什么类型 如何备份和还原数据库 如何把一个表加入到DataSet 中? vs2005 新建窗体,如何让Form1.cs与Form1.Designer.cs合并为一个cs,拒绝手工合并!! 高手帮帮忙啊!!!! 在C#中做水晶报表时,字段视图不可选,怎么解决? 求教多重选择的问题 用淘宝IP接口获取省市县
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), SecuritySafeCritical]
public override unsafe int GetHashCode()
{
fixed (char* str = ((char*) this))
{
char* chPtr = str;
int num = 0x15051505;
int num2 = num;
int* numPtr = (int*) chPtr;
for (int i = this.Length; i > 0; i -= 4)
{
num = (((num << 5) + num) + (num >> 0x1b)) ^ numPtr[0];
if (i <= 2)
{
break;
}
num2 = (((num2 << 5) + num2) + (num2 >> 0x1b)) ^ numPtr[1];
numPtr += 2;
}
return (num + (num2 * 0x5d588b65));
}
}