Skip to content

Instantly share code, notes, and snippets.

@Legends
Last active November 10, 2019 08:03
Show Gist options
  • Select an option

  • Save Legends/2dbddde0d45a6a9c30d4703474623de2 to your computer and use it in GitHub Desktop.

Select an option

Save Legends/2dbddde0d45a6a9c30d4703474623de2 to your computer and use it in GitHub Desktop.
string _PropertyNameAttributeIsAppliedTo;
string _filePath;
public CustomDate([CallerMemberName]string propertyName = null, [CallerFilePath] string filePath = null) // gets the property name
{
_PropertyNameAttributeIsAppliedTo = propertyName;
_filePath = filePath; // //Returns full path of the calling class
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment