Mahmood,
Do you mean the different between:
myclass s = new myclass();
//Do stuff with s
versus
using(myclass s = new myclass()){
//do stuff with s
}
The latter is basically a single block wrapper of this:
myclass s = new myclass();
try{
//do stuff with s
}
finally{
//dispose s properly
}
Using this is a shortcut for cases where you want to ensure that resources are released/closed/cleaned up before processing continues whether there is an exception thrown by the contained code or not.
-Peter
peterlanoie.blog