I have an "Icons" folder. I need to access the same in order to add an icon to the imageList . I am using the app.config file which has a relative path.
<add key="doc" value="..\Icons\_Microsoft Office Excel 97-2003 Worksheet.ico" />
and I use the code below to add it to imgList , however it throws a System.IO.FileNotFoundException :
smallImageList.Images.Add(Image.FromFile(ConfigurationSettings.AppSettings["doc"]));
What is the problem?
c # app-config
Anees
source share