コード例 #1
0
 /// <summary>
 /// Sets <see cref="ContentString"/> as a UTF8 string from <see cref="ContentData"/>, and
 /// by default DELETES <see cref="ContentData"/> afterwards, then returns the string directly.
 /// </summary>
 /// <param name="deleteContentData">True to delete <see cref="ContentData"/> after calling this. TRUE by default.</param>
 public string GetContentString(bool deleteContentData = true)
 {
     if (ContentData.NotNulle())
     {
         ContentString = System.Text.Encoding.UTF8.GetString(ContentData);
         if (deleteContentData)
         {
             ContentData = null;
         }
     }
     return(ContentString);
 }