2

変数を宣言した後にコメントを追加したい場合があります。例えば:

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ました。

これらの変数の上にマウスを移動すると、ツールチップが表示され、コメントが表示されます。ただし、コメントが非常に長い場合、ツールチップの幅は非常に大きくなります。

変数の宣言から気を散らすので、次のように書きたくありません。

// 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;

ツールチップに複数行が表示されるように、VS2010 のコメントに改行文字を入れる方法はありますか?

4

1 に答える 1

0

現時点では、コメントとツールチップはどちらも長いか、複数行になっています。ここでより適切に制御できるように、マークアップ (\n、< br />、またはこのようなもの) があると便利です。または、そのようなツールチップの最大幅を指定できるオプションも問題を解決します。

「回避策」として、変数名が長くなってもコメントを短くすることをお勧めします。変数が自明である場合、これはコードの可読性をサポートします

于 2013-02-01T10:21:59.600 に答える