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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top