//public MemoryStream DownLoadFilefromBlobStorage(string foldername,string blobfilename)
        //{
        //    try
        //    {

        //        BlobRequestOptions optionsWithUseTransactionalMD5 = new BlobRequestOptions() { UseTransactionalMD5 = true };

        //        CloudBlockBlob blockBlobReference = new CloudStorageAccount(new StorageCredentials(AccountName, AccountKey), true).CreateCloudBlobClient().GetContainerReference(ContainerName + "/" + FolderName).GetBlockBlobReference(BlobFileName);
        //        MemoryStream memoryStream = new MemoryStream();
        //        blockBlobReference.DownloadToStream((Stream)memoryStream, (AccessCondition)null, optionsWithUseTransactionalMD5, (OperationContext)null);
        //        return memoryStream;
        //    }
        //    catch (Exception ex)
        //    {
        //        return (MemoryStream)null;
        //    }
        //}



        public MemoryStream DownLoadFilefromBlobStorage(string foldername, string blobfilename)
        {
            try
            {
                BlobRequestOptions optionsWithUseTransactionalMD5 = new BlobRequestOptions()
                {
                    UseTransactionalMD5 = true
                };

                CloudBlockBlob blockBlobReference = new CloudStorageAccount(new StorageCredentials(AccountName, AccountKey), true).CreateCloudBlobClient().GetContainerReference(ContainerName + "/" + foldername).GetBlockBlobReference(blobfilename);
                MemoryStream   memoryStream       = new MemoryStream();
                blockBlobReference.DownloadToStream((Stream)memoryStream, (AccessCondition)null, optionsWithUseTransactionalMD5, (OperationContext)null);
                return(memoryStream);
            }
            catch (Exception ex)
            {
                return((MemoryStream)null);
            }
        }