Name the pattern - Create, Set, Execute, Destroy?

Posted by Seb Nilsson on Stack Overflow See other posts from Stack Overflow or by Seb Nilsson
Published on 2010-05-25T08:26:20Z Indexed on 2010/05/25 8:31 UTC
Read the original article Hit count: 203

Filed under:

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?

© Stack Overflow or respective owner

Related posts about Patterns