1.引用命名空间,减少冗余代码。
Using System.Web;

2.即时释放资源。

Using (SqlConnection conn = new SqlConnection("连接字符串")

{  }
3.创建命名空间的别名(using 别名)。

Using MyAlias = MyProject.Config.Nested;

相关文章:

  • 2022-12-23
  • 2021-11-05
猜你喜欢
  • 2022-12-23
  • 2021-08-22
  • 2021-08-10
  • 2021-09-15
相关资源
相似解决方案