C# 5.0 Features
suggest changeSyntax
- Async & Await
- public Task MyTaskAsync(){ doSomething(); }
await MyTaskAsync();
- public Task
<string>
MyStringTaskAsync(){ return getSomeString(); }
string MyString = await MyStringTaskAsync();
- Caller Information Attributes
- public void MyCallerAttributes(string MyMessage,
[CallerMemberName] string MemberName = “”,
[CallerFilePath] string SourceFilePath = “”,
[CallerLineNumber] int LineNumber = 0)
- Trace.WriteLine(“My Message: “ + MyMessage);
Trace.WriteLine(“Member: “ + MemberName);
Trace.WriteLine(“Source File Path: “ + SourceFilePath);
Trace.WriteLine(“Line Number: “ + LineNumber);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents