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);
Method/Modifier with Parameter | Details |
---|---|
Type<T> | T is the return type |
C# 5.0 is coupled with Visual Studio .NET 2012