create a scope in C#

  • Thread starter Thread starter cs03
  • Start date Start date
cs03, what do you mean by create a scope? Whenever you create an if
statement you 'create scope'; any variables defined in the if block are
scoped just to that block. You might be asking about how to create scope so
that garbage collection will clean up variables when they go out of scope.
If that's the case check out the using statement.
 
Back
Top