我正在尝试使用 ID3v1TagReader 创建一个链接,以便它可以将 ID3 标记转换为字符串并在我的程序中显示它们。
我用来执行此操作的代码是:
private void button3_Click(object sender, EventArgs e)
{
//This is refrencing the Tag Reader
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
ID3v1TagReader tr = new ID3v1TagReader();
ID3v1TagReader.ID3v1Tag ti = new ID3v1TagReader.ID3v1Tag();
//This is telling the tag reader in which field the information must go
ti = tr.ReadID3v1Tag(openFileDialog1.FileName);
trackTextBox.Text = ti.TrackName;
artistTextBox.Text = ti.ArtistsName;
albumTextBox.Text = ti.AlbumName;
comboBox1.Text = ti.Genres;
locationTextBox.Text = openFileDialog1.FileName;
yearTextBox.Text = ti.Year;
}
}
行“ID3v1TagReader.ID3v1Tag ti = new ID3v1TagReader.ID3v1Tag();” 给出错误:“类型名称 'ID3v1Tag' 不存在于类型 'ID3v1TagReader' 中”