Created
December 28, 2011 09:13
-
-
Save JoanComasFdz/1527219 to your computer and use it in GitHub Desktop.
Attribute to contain a string value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// This attribute allows to attach to any | |
/// class, method, property or enumerator member | |
/// a string value. | |
/// </summary> | |
public class StringValueAttribute : Attribute | |
{ | |
/// <summary> | |
/// Returns the attached string value. | |
/// </summary> | |
public string Value { get; private set; } | |
/// <summary> | |
/// Creates a new instance of the <see cref="StringValueAttribute"> | |
/// with the specified value. | |
/// </summary> | |
/// <param name="value">The value you want to attach to.</param> | |
public StringValueAttribute(string value) | |
{ | |
Value = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment