c# - 在带有 XML 文档的 Visual Studio 中:如何引用其他参数?
问题描述
(就我而言,我正在 Visual Studio Community 2019 中编写 C# 代码以在 Unity 中使用。)
我根本找不到任何方法来做到这一点,除非我想通过学习如何编写自己的 Visual Studio 扩展来解决问题,所以在这里我问:
问题:
在编写例如 a 时<param>
,是否可以简单地告诉它使用 another <param>
?
示例: 例如,采取以下代码:
public class TextClass
{
Vector3 pos;
Vector3 rot;
///<summary> Moves the object. </summary>
///<param name="newPos"> The new position of the object. </param>
public void Move(Vector3 newPos)
{
pos = newPos;
}
///<summary> Moves the object. </summary>
///<param name="newPos"> The new position of the object. </param>
///<param name="newRot"> The new rotation of the object. </param>
public void Move(Vector3 newPos, Vector3 newRot)
{
pos = newPos;
rot = newRot;
}
}
对于这两个Move
功能,都具有“移动对象”。作为摘要和“对象的新位置”。作为. param
_ newPos
我非常希望能够告诉第一个移动函数只使用param
第二个Move
函数的摘要和。
解决方案
这就是inheritdoc可以用来做的事情。您可以让您的第一个 Move 函数使用它来继承第二个 Move 函数的文档。
推荐阅读
- php - 使用 livewire 组件上传文件的问题
- sql-server - SQL - 在多个日期范围内查找记录时出现问题
- python - 如果用户在选择图像之前单击取消,我如何捕获异常?
- firebase - Flutter Firesbase 返回 Null
- javascript - 在刀片条件语句中使用 Javascript 变量
- python - 数据框 - 四舍五入到 N 位小数
- powershell - 在 for-each 循环中使用选择字符串
- amazon-web-services - 识别 ECS 实例的硬编码 DNS 记录
- regex - 用于匹配/提取部分文件名的正则表达式
- python - 使用python在jinja2模板中单击按钮生成CSV文件