mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Fixes typos
This commit is contained in:
parent
8b62c313b1
commit
f6032ba190
@ -435,14 +435,14 @@ on a new line! ""Wow!"", the masses cried";
|
||||
Func<int, int> square = (x) => x * x; // Last T item is the return value
|
||||
Console.WriteLine(square(3)); // 9
|
||||
|
||||
// DISPOSABLE RESSOURCES MANAGEMENT - let you handle unmanaged resources easily
|
||||
// DISPOSABLE RESSOURCES MANAGEMENT - let you handle unmanaged resources easily.
|
||||
// Most of objects that access unmanaged resources (file handle, device contexts, etc.)
|
||||
// implement the IDisposable interface. The using statement takes care of
|
||||
// cleaning those IDisposable objects for you.
|
||||
using (StreamWriter writer = new StreamWriter("log.txt"))
|
||||
{
|
||||
writer.WriteLine("Nothing suspicious here");
|
||||
// At the end of scope, ressources will be released.
|
||||
// At the end of scope, resources will be released.
|
||||
// Even if an exception is thrown.
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user