Name the pattern - Create, Set, Execute, Destroy?
- by Seb Nilsson
I somewhere heard that the .NET Framework was built around specific pattern, which they tried to uphold as much as possible.
var rsa = new RSACryptoServiceProvider(); // Create
rsa.ImportParameters(GetParameters()); // Set
byte[] encrypted = rsa.Encrypt(data, true); // Execute
// Destroyed by garbage-collector
Are there any variants of this? What are the general pros and cons?