Intern Day20

  1. C#:var userid = int.Parse(_principal.UserId); int.Parse把字符串转成整型

  2. 在代码中给调用者提示所调用的方法并不是最优的,它可以被一个更好的方法所替代:通常可以用 [Obsolete]特性来标记该方法是一个被荒弃的方法。

  3. order by用于对一列或者多列数据进行升序ASC降序DESC排列。(默认升序)

    • 升序使用:order by 列名order by 列名 asc

    • 降序使用:order by 列名 desc

    • order by a,b desc表示:a升序、b降序

  4. SQL查询语句中的 limit 与 offset 的区别:(分页)

    • limit y :读取 y 条数据

    • limit x, y :跳过 x 条数据,读取 y 条数据

    • limit y offset x :跳过 x 条数据,读取 y 条数据

  5. select t.*是选出t表的所有信息

  6. Thread.sleep() 和Object.wait() 是多线程编程中最常用的使线程等待的两个方法

    • sleep()方法输入Thread类,而Object.wait()方法属于Object类

    • sleep()方法使线程睡眠一定的时间,不能被唤醒;而wait()可以被唤醒,通过notify()/notifyAll()方法唤醒线程

  7. WebApi FromBody参数:https://blog.csdn.net/bafnypeu/article/details/78262684?locationNum=12&fps=1

  8. where来限定泛型约束:https://blog.csdn.net/wcc27857285/article/details/96424449

  9. Value Task<T>:https://blog.csdn.net/weixin_43542114/article/details/109120109?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control&dist_request_id=&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control

  10. logger.debug:https://blog.csdn.net/chuixue24/article/details/86521176

  11. Task.Run()方法总结:https://blog.csdn.net/weixin_30632089/article/details/96164098https://q.cnblogs.com/q/92720/

  12. 委托:https://zhidao.baidu.com/question/2010990505246671028

原文地址:https://www.cnblogs.com/OFSHK/p/14506952.html