[注意] 编写时注意事项 #43

Open
opened 2026-03-03 10:32:05 +08:00 by lrss3 · 0 comments
Owner

错误 CS0118 “Type”是 命名空间,但此处被当做 类型 来使用 XericLibrary

在引入比如SingleBase<>类型时,namespace XericLibrary.Runtime.Type可能会与Type类型重名,导致项目会产生报错.
可以通过将 Type 改为 System.Type 来解决这个问题。
或者SingleBase<> 改为 XericLibrary.Runtime.Type.SingleBase<>也行。

# 错误 CS0118 “Type”是 命名空间,但此处被当做 类型 来使用 XericLibrary 在引入比如`SingleBase<>`类型时,`namespace XericLibrary.Runtime.Type`可能会与`Type`类型重名,导致项目会产生报错. 可以通过将 `Type` 改为 `System.Type` 来解决这个问题。 或者`SingleBase<>` 改为 `XericLibrary.Runtime.Type.SingleBase<>`也行。
lrss3 added the help wanted label 2026-03-03 10:33:28 +08:00
lrss3 pinned this 2026-03-03 10:33:30 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LiRuochen_WorkFlow/XericLibrary-Publish#43