Manoj Maharana

Manoj Maharana

  • NA
  • 362
  • 126.7k

AmazonMetaData Unable to cast object of type System.String

Dec 1 2016 7:33 AM

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)