in general you replace CType() with a c# cast.
https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
hello...im using UltraID3Lib and i have this code...but it seems it has an error in th variable "pics"...is there a solution to this?
i Already made it work in Visual Basic and it uses a CTYPE...im new here in C#..Thanks!!
private void listbox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listbox1.SelectedItem == null)
{
return;
}
else
{
myMp3.Read("" + listbox1.SelectedItem);
lbtitle.Text = "Title : " + myMp3.ID3v2Tag.Title;
lbartist.Text = "Artist : " + myMp3.ID3v2Tag.Artist;
lbalbum.Text = "Album : " + myMp3.ID3v2Tag.Album;
lbyear.Text = "Year : " + myMp3.ID3v2Tag.Year.ToString();
lbnumb.Text = "No : " + myMp3.ID3v2Tag.TrackNum.ToString();
txtcom.Text = myMp3.ID3v2Tag.Comments;
lbgenre.Text = "Genre : " + myMp3.ID3v2Tag.Genre;
var pics = myMp3.ID3v2Tag.Frames.GetFrames(CommonMultipleInstanceID3v2FrameTypes.Picture);
pictimg.Image = (ID3v2PictureFrame)pics(0).Picture;
}
}
in general you replace CType() with a c# cast.
https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions