private byte[] ReadTileFile(string tilePath)
{
//read content from the file
using (System.IO.FileStream textFile = new System.IO.FileStream(tilePath, FileMode.Open))
{
byte[] buffer = new byte[textFile.Length];
textFile.Read(buffer, 0, buffer.Length);
textFile.Close();
return buffer;
}
}