Try this:
using System;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
class Test
{
static void Main()
{
var key = @"-----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBAKj34GkxFhD90vcNLYLInFEX6Ppy1tPf9Cnzj4p4WGeKLs1Pt8Qu
KUpRKfFLfRYC9AIKjbJTWit+CqvjWYzvQwECAwEAAQJAIJLixBy2qpFoS4DSmoEm
o3qGy0t6z09AIJtH+5OeRV1be+N4cDYJKffGzDa88vQENZiRm0GRq6a+HPGQMd2k
TQIhAKMSvzIBnni7ot/OSie2TmJLY4SwTQAevXysE2RbFDYdAiEBCUEaRQnMnbp7
9mxDXDf6AU0cN/RPBjb9qSHDcWZHGzUCIG2Es59z8ugGrDY+pxLQnwfotadxd+Uy
v/Ow5T0q5gIJAiEAyS4RaI9YG8EWx/2w0T67ZUVAw8eOMB6BIUg0Xcu+3okCIBOs
/5OiPgoTdSy7bcF9IGpSE8ZgGKzgYQVZeN97YE00
-----END RSA PRIVATE KEY-----";
var ciphertext = "L812/9Y8TSpwErlLR6Bz4J3uR/T5YaqtTtB5jxtD1qazGPI5t15V9drWi58colGOZFeCnGKpCrtQWKk4HWRocQ==";
var ciphertextBytes = Convert.FromBase64String(ciphertext);
var rsa = RSA.Create();
var rx = new Regex("-+[^-]+-+");
key = rx.Replace(key, "")
.Replace("\r", "")
.Replace("\n", "");
var keyBytes = Convert.FromBase64String(key);
rsa.ImportRSAPrivateKey(keyBytes, out _);
var plaintextBytes = rsa.Decrypt(ciphertextBytes, RSAEncryptionPadding.Pkcs1);
var plaintext = Encoding.Default.GetString(plaintextBytes);
Console.WriteLine(plaintext);
}
}
ImportRSAPrivateKey
wasn't introduced until .NET Core 3.0+ but since you're using C# .NET Framework 4.6 I think you're probably good!