学了一段时间了,总结记录下期间的感悟和理解,方便记忆。
之前都是跟着AI敲代码,当前在整理代码的过程中,一点一点的有了自己的理解。
下表是列出的相对c#语言的对照表。
| go | c# |
|---|---|
| 文件夹名称 | 类名 |
| 方法名或变量首字母大写 | 访问修饰符public |
| 方法名或变量首字母小写 | 访问修饰符private |
| import | using |
| func(参数1, 参数2) | delegate/event(参数1, 参数2) |
目录结构:

csharp
import (
"HTTPServices/http_handle_funcs"
"HTTPServices/redis_model"
"HTTPServices/tools"
"HTTPServices/db_entities"
"HTTPServices/defines"
)
//调用外部文件内容的方法和变量
http_handle_funcs.HelloHandler()
defines.Db.Close(
defines.Host