.NET6 全局using

语法

全局using你再也不用每个类里都引用命名空间了
项目的csproj文件中加入

  <ItemGroup>
    <PackageReference Include="LeetCode.CommunityToolKit" Version="4.0.3" />
    <Using Include="LeetCode.CommunityToolKit.Models;" />
    <Using Include="System.Collections.Generic;" />
    <Using Include="System.Linq;" />
  </ItemGroup>

Exapples

https://github.com/huzuohuyou/LeetCode

posted @ 2022-06-16 17:58  喜爱糖葫芦  阅读(380)  评论(0编辑  收藏  举报