title: C# Adding Comments with YouTube V3 API
body: <p>I am using C# and using the YouTube V3 API. I am trying to insert a comment into a Video however whenever I do I receive a exception of <code>"{"Object reference not set to an instance of an object."}"</code> This happens whenever I run anything similar to the above code:</p>
  
  <pre><code>public void AddComment()
  {
      CommentThread commentToAdd = new CommentThread();
      commentToAdd.Snippet.IsPublic = true;
      commentToAdd.Snippet.TopLevelComment.Snippet.TextOriginal = "Test";
      commentToAdd.Snippet.VideoId = "kc-LBxBcyG8";
      commentToAdd.Snippet.TopLevelComment.Snippet.VideoId = "kc-LBxBcyG8";
      CommentThreadsResource.InsertRequest ins = JKYouTube.NewYouTubeService().CommentThreads.Insert(commentToAdd, "snippet");
      var insertedComment = ins.Execute();
  }
  </code></pre>
  
  <p>I am comparing this to the google explorer and using the same properties and the explorer actually adds the comments where as my program just fails. <a href="https://developers.google.com/youtube/v3/docs/commentThreads/insert" rel="nofollow">https://developers.google.com/youtube/v3/docs/commentThreads/insert</a></p>
  
  <p>As soon as it reaches the second line of code of
  <code>commentToAdd.Snippet.IsPublic = true;</code></p>
  
  <p>It will just error and continue for every line above.</p>
  
  <p>Any help would be greatly appreciated. </p>