Rabu, 23 Juni 2010
Great Uses of Using Statement in C#
In my last post about testing emails in .NET, I noted the use of the using statement to ensure safe usage of the IDisposable SmtpClient and MailMessage objects. This is the typical usage of the using statement, but you can take advantage of this statement’s behavior for other scenarios as well, resulting in cleaner code. Consider the scenario where you want to perform some kind of pre- and post-
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar