Simplify value selection I have two different data inputs for the same value, I want to use the non empty one if one of them is, to return the empty string if both are empty, and to flag an error if both are not empty but differ and return one of them.

Empty for my criteria matches the meaning of string.IsNullOrEmpty().

And it's okay that it's written as a property (don't worry about that part.)

This works but feels overly verbose. Can you think of any alternatives?

    public string Callkey
    {
        get
        {
            if (string.IsNullOrEmpty(AS_CALL_KEY) &amp;&amp; !string.IsNullOrEmpty(CALLKEY)) 
            {
                return CALLKEY.Trim();
            }
            if (!string.IsNullOrEmpty(AS_CALL_KEY) &amp;&amp; string.IsNullOrEmpty(CALLKEY))
            {
                return AS_CALL_KEY.Trim();
            }
            if (!string.IsNullOrEmpty(AS_CALL_KEY) &amp;&amp; !string.IsNullOrEmpty(CALLKEY))
            {
                if (!AS_CALL_KEY.Trim().Equals(CALLKEY.Trim()))
                {
                    _error = true;
                }
                return AS_CALL_KEY.Trim();
            }
            if (string.IsNullOrEmpty(AS_CALL_KEY) &amp;&amp; string.IsNullOrEmpty(CALLKEY))
            {
                return "";
            }
            _error = true;
            return "THISNEVERHAPPENS";
        }
    }
You have four cases and each of them behaves differently, so you actually need to have four different branches. But you can simplify your code by extracting the checks into variables and using nested ifs:

public string CallKey
{
    get
    {
        bool callKeyEmpty = string.IsNullOrEmpty(CALLKEY);
        bool asCallKeyEmpty = string.IsNullOrEmpty(AS_CALL_KEY);

        if (callKeyEmpty) 
        {
            if (asCallKeyEmpty)
                return "";
            else
                return AS_CALL_KEY.Trim();
        }
        else
        {
            if (asCallKeyEmpty)
                return CALLKEY.Trim();
            else
            {
                if (AS_CALL_KEY.Trim() != CALLKEY.Trim())
                    _error = true;
                return AS_CALL_KEY.Trim();
            }
        }
    }
}


As an added benefit, you can now remove the “this never happens” part.