Skip to content

Instantly share code, notes, and snippets.

@Microncode
Last active January 20, 2020 19:00
Show Gist options
  • Save Microncode/6e161da9997fb549af1b86d6928bdcfa to your computer and use it in GitHub Desktop.
Save Microncode/6e161da9997fb549af1b86d6928bdcfa to your computer and use it in GitHub Desktop.
Here is a snap example of using the CSID3Tags in order to set the ID3 tags of the media file using C#
//A snap example of using the CSID3Tags in order to set the
//ID3 tags of the media file using C#
//Open the media file:
iD3Tags1.Open(txtMediaFile.Text);
//Set the title:
iD3Tags1.TagTitle = txtTagTitle.Text;
//Set the album name:
iD3Tags1.TagAlbum = txtTagAlbum.Text;
//Set the comment:
iD3Tags1.TagComment = txtTagComment.Text;
//Set the copyright:
iD3Tags1.TagCopyright = txtTagCopyright.Text;
//Set the lyrics:
iD3Tags1.TagLyrics = txtTagLyrics.Text;
//Set the rating tag:
float floatrating;
if (!float.TryParse(cboTagRating.Text, out floatrating))
{
floatrating = 0;
}
iD3Tags1.RatingStars = floatrating;
//Set the year:
iD3Tags1.TagYear = txtTagYear.Text;
//Save the tags in the txtMediaFile.Text file:
iD3Tags1.Set();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment