var values = new NameValueCollection
{
{ "key", ConfigurationSettings.AppSettings["API-Key"].ToString() },
{ "image", Convert.ToBase64String(File.ReadAllBytes(photo.ToString())) }
};
Cách mới để sử dụng tệp app.config là gì?ConfigurationSettings.AppSettings đã lỗi thời, cảnh báo
Bản sao có thể có của [Tên 'Trình quản lý cấu hình' không tồn tại trong ngữ cảnh hiện tại] (http://stackoverflow.com/questions/1274852/the-name-configurationmanager-does-not-exist-in-the-current -context) – Matt