열거를 위해 Intellisense와 함께 vs 2008에서 XML 댓글을 작성하는 방법은 무엇입니까?
-
20-09-2019 - |
문제
모든 XML 코미딩이 IntellIsense에 나타나는 것은 아니지만 아마도 내가 올바르게하고 있지 않습니까? 어쨌든, 나는 열거 목록의 개별 열거 회원이 설명 텍스트와 함께 Intellisense에 표시되도록 만들려고 노력하고 있습니다. 예를 들어, string.split 메소드에서 세 번째 오버로드는 여기에 표시된 것처럼 stringsplitoptions 열거를 매개 변수로 취합니다.
대체 텍스트 http://www.freeimagehosting.net/uploads/a138d36615.jpg
내가 시도한 것들 중에서도 :
public enum ErrorTypeEnum
{
/// <summary>The process could not identify an agency </summary>
BatchAgencyIdentification // Couldn't identify agency
/// <summary>The batch document category was invalid.</summary>
, BatchInvalidBatDocCatCode // Anything other than "C"
/// <summary>The batch has no documents.</summary>
, BatchHasNoDocuments // No document nodes
...
위의 예는 효과가 있지만 다른 열거는 다른 열거와 만 작동합니다.
내가 뭘 잘못하고있는거야?
해결책
당신은 올바른 아이디어를 가지고 있지만 쉼표 배치가 그것을 망치고 있습니다. 개별 열거에 나타나려면 이전이 아닌 쉼표 뒤에 배치하십시오. 이 경우 시작 대신 각 줄의 끝에 쉼표를 배치 할 수 있습니다.
예를 들어
public enum ErrorTypeEnum
{
/// <summary>The process could not identify an agency </summary>
BatchAgencyIdentification, // Couldn't identify agency
/// <summary>The batch document category was invalid.</summary>
BatchInvalidBatDocCatCode, // Anything other than "C"
/// <summary>The batch has no documents.</summary>
BatchHasNoDocuments // No document nodes
...
제휴하지 않습니다 StackOverflow