This is how you create a RSA key pair and use it to encrypt/decrypt a byte[]:

// Generate key pair
var rsa = new RSA();
rsa.GenerateKeys(2048, 0x10021, null, null);

// Encrypt file
byte[] payLoad = File.ReadAllBytes("c:\folder\myfile.ext");
byte[] encryptedResult = rsa.PublicEncrypt(payload, RSA.Padding.PKCS1);

// Decrypt file
byte[] decryptedResult = rsa.PrivateDecrypt(encryptedResult, RSA.Padding.PKCS1);

Hope this helps!