DiscussionThread.AddComment 方法 (Comment, Comment)
將指定的註解加入至這個討論。
例外狀況會擲回,如果:1. parentComment 是空的,但是:a. 這項討論有根註解。
b. 這項討論已經刪除。
2. parentComment 未發行到伺服器。
命名空間: Microsoft.TeamFoundation.Discussion.Client
組件: Microsoft.TeamFoundation.Discussion.Client (在 Microsoft.TeamFoundation.Discussion.Client.dll 中)
語法
'宣告
Public Function AddComment ( _
comment As Comment, _
parentComment As Comment _
) As Comment
public Comment AddComment(
Comment comment,
Comment parentComment
)
參數
- comment
類型:Microsoft.TeamFoundation.Discussion.Client.Comment
要加入的註解。
- parentComment
類型:Microsoft.TeamFoundation.Discussion.Client.Comment
指定註解的父代。如果是 null,新的註解將會是。
傳回值
類型:Microsoft.TeamFoundation.Discussion.Client.Comment
加入新的註解。
備註
這個方法不會執行一次伺服器物件。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱 從部分受信任程式碼使用程式庫。