Skip to content

Instantly share code, notes, and snippets.

@davidblurton
Created March 8, 2013 12:01
Show Gist options
  • Save davidblurton/5116002 to your computer and use it in GitHub Desktop.
Save davidblurton/5116002 to your computer and use it in GitHub Desktop.
Allow you to use caller member name attribute in .NET 4. Requires the C#5 compiler so all developers must be using VS2012 else it will fail silently.
// ReSharper disable CheckNamespace
namespace System.Runtime.CompilerServices
// ReSharper restore CheckNamespace
{
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public sealed class CallerMemberNameAttribute : Attribute
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment