title: C# From ObjectResult to string (or get value)
body: <p>I'm using a IActionResult (task) to upload a file and i refference that in my controller. What i want to get back is the file name.</p>
  
  <p>Controller -> </p>
  
  <pre><code>        var imageLocation = await _imageHandler.UploadImage(image);
  </code></pre>
  
  <p>ImageHandler -> </p>
  
  <pre><code>    public async Task&lt;IActionResult&gt; UploadImage(IFormFile file)
      {
          var result = await _imageWriter.UploadImage(file);
  
          return new ObjectResult(result);
      }
  </code></pre>
  
  <p>My value is stored in imageLocation, but i have no idea how to access it (i need the "Value" string so i can add it to DB).</p>
  
  <p><a href="https://i.stack.imgur.com/Bt2Wr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bt2Wr.png" alt="enter image description here"></a></p>
  
  <p>I've tried searching for everything, but everyone is using a list. I only need a string here.
  Hopefully you guys can help me out. Thanks!</p>