Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在c#xml文档中引用枚举常量_C#_Documentation_Enums_Xml Documentation - Fatal编程技术网

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

如何在c#xml文档中引用枚举常量,c#,documentation,enums,xml-documentation,C#,Documentation,Enums,Xml Documentation,我想记录枚举类型字段的默认值: /// <summary> /// The default value is <see cref="Orientation.Horizontal" />. /// </summary> public Orientation BoxOrientation; // ///默认值为。 /// 公众导向; 编译器警告它无法解析引用。前缀F:或M:会使编译器静音,但E:也会,因此我不确定前缀是正确的。前缀F、M和E都是有效的,可能是

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

/// <summary>
/// The default value is <see cref="Orientation.Horizontal" />.
/// </summary>
public Orientation BoxOrientation;
//
///默认值为。
/// 
公众导向;

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

前缀
F
M
E
都是有效的,可能是编译器警告消失的原因

但是,您应该使用引用字段的
F
。有关Visual Studio如何生成文档标识符的详细信息,请参阅:


我认为您不需要前缀-可能需要在定义
方向的命名空间中添加一个“using”