I am trying to access the Authors fields from a picture.
I am using System.Windows. Media.Imaging;
My code:
BitmapSource img = BitmapFrame.Cre ate(fs);
BitmapMetadata md = (BitmapMetadata )img.Metadata;
lblTitle.Text = md.Title;
lblSubject.Text = md.Subject;
lblAuthors.Text = md.Author; // <======
lblComments.Tex t = md.Comment;
lblDateTaken.Te xt = md.DateTaken;
It doesn't like highlighted line:
Cannot implicitely convert type "System.Collect ions.ObjectMode l.ReadOnlyColle ction<string> to <string>.
Evidently, I don't have a good enough grasp of C#. Can anyone help?
Thanks in advance.
I am using System.Windows. Media.Imaging;
My code:
BitmapSource img = BitmapFrame.Cre ate(fs);
BitmapMetadata md = (BitmapMetadata )img.Metadata;
lblTitle.Text = md.Title;
lblSubject.Text = md.Subject;
lblAuthors.Text = md.Author; // <======
lblComments.Tex t = md.Comment;
lblDateTaken.Te xt = md.DateTaken;
It doesn't like highlighted line:
Cannot implicitely convert type "System.Collect ions.ObjectMode l.ReadOnlyColle ction<string> to <string>.
Evidently, I don't have a good enough grasp of C#. Can anyone help?
Thanks in advance.
Comment