Skip to content

Instantly share code, notes, and snippets.

@tpetrina
Created March 30, 2012 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpetrina/2254393 to your computer and use it in GitHub Desktop.
Save tpetrina/2254393 to your computer and use it in GitHub Desktop.
Attribute types definitions for using C# 5 caller info attributes in projects targeting earlier frameworks i.e. before .NET 4.5
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
public sealed class CallerMemberNameAttribute : Attribute
{
public CallerMemberNameAttribute()
{ }
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
public sealed class CallerFilePathAttribute : Attribute
{
public CallerFilePathAttribute()
{
}
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
public sealed class CallerLineNumberAttribute : Attribute
{
public CallerLineNumberAttribute()
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment