feat(csharp) .NET 8.0 code migration (#966)

* .net 8.0 migration

* update docs

* revert change

* revert change and update appendix docs

* remove static

* Update binary_search_insertion.cs

* Update binary_search_insertion.cs

* Update binary_search_edge.cs

* Update binary_search_insertion.cs

* Update binary_search_edge.cs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
hpstory
2023-11-26 23:18:44 +08:00
committed by GitHub
parent d960c99a1f
commit 56b20eff36
93 changed files with 539 additions and 487 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ namespace hello_algo.chapter_hashing;
public class simple_hash {
/* 加法哈希 */
public static int AddHash(string key) {
int AddHash(string key) {
long hash = 0;
const int MODULUS = 1000000007;
foreach (char c in key) {
@@ -18,7 +18,7 @@ public class simple_hash {
}
/* 乘法哈希 */
public static int MulHash(string key) {
int MulHash(string key) {
long hash = 0;
const int MODULUS = 1000000007;
foreach (char c in key) {
@@ -28,7 +28,7 @@ public class simple_hash {
}
/* 异或哈希 */
public static int XorHash(string key) {
int XorHash(string key) {
int hash = 0;
const int MODULUS = 1000000007;
foreach (char c in key) {
@@ -38,7 +38,7 @@ public class simple_hash {
}
/* 旋转哈希 */
public static int RotHash(string key) {
int RotHash(string key) {
long hash = 0;
const int MODULUS = 1000000007;
foreach (char c in key) {