跳到主要内容
CodeWiki
练习
学习路径
学习方向
速查表
试验场
术语表
AI 时代
搜索
⌘K
中文
英语
中文
练习
学习路径
学习方向
速查表
试验场
术语表
AI 时代
中文
英语
中文
练习
/
测验
/
C#
/
反射
扫描器需要读取特性中记录的实参,但不能实例化特性,应使用哪个 API?
来自 反射
C# 14 / .NET 10
进阶
1分钟
扫描器需要读取特性中记录的实参,但不能实例化特性,应使用哪个 API?
`CustomAttributeData.GetCustomAttributes(member)`
`member.GetCustomAttributes()`
`member.GetCustomAttribute<Attribute>()`
`Activator.CreateInstance(attributeType)`
检查
向 AI 询问这道练习
报告错误
下一道练习
这段程序会输出哪两个类型名称?
预测输出
有新版本可用
重新加载