本帖最后由 caozhy 于 2012-03-08 08:39:46 编辑

解决方案 »

  1.   

    str.charCodeAt返回第i+1个字符的值,其实就是char,c#中直接通过索引访问 
    string s = "abc";  s[0] = 'a';
    << 5,左移,c#中也是这个
      

  2.   

     string str="@lUUzMKDMG";
                int hash = 5381;
                for (int i = 0; i < str.Length; i++)
                {
                    hash += (hash << 5) + str[i];
                }
                hash += 0x7fffffff;
                MessageBox.Show(hash.ToString());是不是这样写啊,感觉好像还不太可以啊