1
Answer

AmazonMetaData Unable to cast object of type System.String

Manoj Maharana

Manoj Maharana

7y
186
1

Unable to cast object of type 'System.String' to type 'System.Object[]'

here is the code:
  1. string str = MFI.Helpers.Helpers.AmazonS3ImageURLGet(userType, id, pictureFile);  
  2.             AmazonMetaData amazonMetaData;  
  3.             if (MFI.Helpers.Helpers.processingImages.GetObject(str) != null)  
  4.             {  
  5.                  
  6.            
  7.                 //amazonMetaData = (AmazonMetaData)((object[])MFI.Helpers.Helpers.processingImages.GetObject(str))[0];  
  8.                 amazonMetaData = (AmazonMetaData)((object[])MFI.Helpers.Helpers.processingImages.GetObject(str))[0];  
  9.   
  10.             }  
error in amazonMetaData = (AmazonMetaData)((object[])MFI.Helpers.Helpers.processingImages.GetObject(str))[0]; 
 
how to solve?? 
 

Answers (1)