Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Custom Encrypted String Type

public class EncryptedString
{
    private readonly string _value;

    public EncryptedString(string value)
    {
        _value = value;
    }

    public static implicit operator string(EncryptedString s)
    {
        return s._value;
    }

    public static implicit operator EncryptedString(string value)
    {
        if (value == null)
            return null;

        return new EncryptedString(value);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Custom #Encrypted #String #Type
ADD COMMENT
Topic
Name
5+9 =