gpt4 book ai didi

c# - 如何在 c# xml 文档中引用枚举常量

转载 作者:可可西里 更新时间:2023-11-01 07:47:11 25 4
gpt4 key购买 nike

我想记录枚举类型字段的默认值:

/// <summary>
/// The default value is <see cref="Orientation.Horizontal" />.
/// </summary>
public Orientation BoxOrientation;

编译器警告它无法解析引用。前缀 F: 或 M: 会使编译器静音,但 E: 也会静音,所以我不确定哪个前缀是正确的。

最佳答案

前缀 FME 都是有效的,可能是编译器警告消失的原因。

不过,您应该使用引用字段的 F。有关 Visual Studio 如何生成文档标识符的更多信息,请参阅:

Processing the XML File (C# Programming Guide)

关于c# - 如何在 c# xml 文档中引用枚举常量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2745043/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com