SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The CommentId Property of SocialComment is marked as Internal. How can I then delete a specific SocialComment given an ID?

share|improve this question
Did you ever find the solution to this problem? If yes, could you post the answer? – Kit Menke Jul 29 '11 at 18:30
No I havent found a solution yet. – HaavardMeling Aug 4 '11 at 15:25
up vote 0 down vote accepted
int GetCommentID(SocialComment comment)
        var propertyInfo = typeof(SocialComment).GetProperty("CommentID", BindingFlags.NonPublic | BindingFlags.Instance);
        return int.Parse(propertyInfo.GetValue(comment, null).ToString());

p.s. it's very good worked for me. hope, this help you too :)

share|improve this answer
Nice. Did not know that was possible. – HaavardMeling May 24 '12 at 10:55

As far as I can tell it is not possible to get the id. But it is possible to delete by using the url and title instead (optionally also the comment text). Not optimal but it will work for most scenarios.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.