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
。
如果我將鼠標移動到這些變量上,工具提示將顯示並顯示註釋。但是如果評論非常長,工具提示的寬度非常大。
我不想寫如下因爲它的變量聲明分散我的注意力:
// 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所以提示會顯示多線的方式?
用什麼語言? – SLaks
我似乎沒有這個功能。你說當你將鼠標懸停在一個變量名上時,它顯示你在它聲明的行上的評論? –
啊,對此抱歉。我安裝了VAssistX,評論的工具提示是它的一個功能,而不是VS2010。 – user565739