title: How to access a file from the android project in Xamarin
body: <p>I have two files in my android project in Xamarin which I would like to access and turn into a byte array. Something like:
  <code>byte[] fileInBytes = File.ReadAllBytes(Path.Combine("Models", "myFile.dat"));</code></p>
  
  <p><a href="https://i.stack.imgur.com/Tld8H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tld8H.png" alt="The two files that I would like at access"></a></p>
  
  <p>But I haven't been able to access them with the methods I've tried so far. I've tried accessing them by using <code>assembly.GetName().Name + "." + "Models.myFile.dat")</code> but with no luck. I found a lot of examples on how to read from a file in the Assets folder, but I don't need to read, I need the file as bytes.</p>
  
  <p>At the moment the files build action is set to "Embedded Resource", but I don't know if that is correct. Please help.</p>