Help witha variable!!!

Duarte Vinagre 60 Reputation points
2023-07-12T18:00:14.95+00:00

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;
            }
        }
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,191 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 69,196 Reputation points
    2023-07-12T18:20:22.72+00:00

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.