NotificationEvent.CommentText 方法
傳回小於或等於 maxCommentChars 的註解字串
命名空間: Microsoft.TeamFoundation.VersionControl.Common
組件: Microsoft.TeamFoundation.VersionControl.Common.Integration (在 Microsoft.TeamFoundation.VersionControl.Common.Integration.dll 中)
語法
'宣告
Protected Function CommentText ( _
comment As String, _
maxCommentChars As Integer _
) As String
protected string CommentText(
string comment,
int maxCommentChars
)
參數
- comment
型別:System.String
註解文字。
- maxCommentChars
型別:System.Int32
註解字元的最大數目。
傳回值
型別:System.String
表示對應已修剪的註解的字串。
備註
傳回的字串通常做為電子郵件「Subject 和內容頁首區段。
傳回的字串處理如下所示:1. 前置和尾端空白字元移除 2。 如果第一個新行字元在最大之前發生,字串 (,但不包括換行字元)。
3. 如果這個 (空白字元) 的註解的長度大於最大值,則會將它傳回 4。 第一個最大字元的子字串與「…」傳回做為後置字元。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。