2

때로는 변수를 선언 한 후 주석을 추가하는 것을 선호합니다. 예 :Visual Studio 2010의 툴팁

bool isOverhwndChild1; // This is just an example to make my question clear and you can understand. 
bool isOverhwndChild2; // This is just an example to make my question clear and you can understand. 
bool isOverhwndChild3; // This is just an example to make my question clear and you can understand. 
bool isOverhwndChild4; // This is just an example to make my question clear and you can understand. 

Visual Assist X이 설치되었습니다.

마우스를 thses 변수 위로 이동하면 도구 설명이 표시되고 주석이 표시됩니다. 그러나 주석이 매우 길면 툴팁의 폭이 매우 큽니다.

나는 그것이 변수의 선언에서 저를 방해하기 때문에 다음과 같이 쓰고 싶지 않아

:

// This is just an example 
// to make my question clear 
// and you can understand. 
bool isOverhwndChild1; 

// This is just an example 
// to make my question clear 
// and you can understand. 
bool isOverhwndChild2; 

// This is just an example 
// to make my question clear 
// and you can understand. 
bool isOverhwndChild3; 

// This is just an example 
// to make my question clear 
// and you can understand. 
bool isOverhwndChild4; 

는 툴팁이 multilines 표시됩니다 있도록 VS2010에서 코멘트에 개행 문자를 넣을 수있는 방법이 있나요 ?

+0

어떤 언어로되어 있습니까? – SLaks

+1

이 기능이없는 것 같습니다. 변수 이름 위로 마우스를 가져 가면 선언 ​​된 행의 주석이 표시됩니다. –

+1

아, 죄송합니다. VAssistX를 설치했으며 주석을위한 툴팁은 VS2010이 아닌 해당 기능 중 하나입니다. – user565739

답변

0

의견 및 툴팁 모두 길거나 둘 다 multilined입니다. 더 나은 제어가 가능하도록 마크 업 (\ n, < br /> 또는 이와 유사한 것)이 있다면 좋을 것입니다. 또는 툴팁의 최대 너비를 지정할 수있는 옵션으로 문제를 해결할 수 있습니다.

"임시 해결 방법"은 변수 이름이 길어질지라도 주석을 더 짧게 만들 것을 제안합니다. 변수가 자명하다면 코드의 가독성도 지원합니다.