Something like:
using (IDisposable disposable = GetSomeDisposable())
{
//.....
//......
return Stg();
}
I believe it is not a p
It's absolutely fine - no problem at all. Why do you believe it's wrong?
A using statement is just syntactic sugar for a try/finally block, and as Grzenio says it's fine to return from a try block too.
The return expression will be evaluated, then the finally block will be executed, then the method will return.