O
O.B.
I have the following code in many places throughout my code.
if (IsValid())
{
try
{
// Code-to-execute
}
finally
{
Cleanup();
}
}
I'd like to replace it with:
NewOperation()
{
// Code-to-execute
}
I believe that this is possible because it appears that C# operations
like "lock" do exactly this. How would one go about creating
NewOperation?
if (IsValid())
{
try
{
// Code-to-execute
}
finally
{
Cleanup();
}
}
I'd like to replace it with:
NewOperation()
{
// Code-to-execute
}
I believe that this is possible because it appears that C# operations
like "lock" do exactly this. How would one go about creating
NewOperation?