CQRS.Talk.Sample1.SeparateReadsFromWrites.DictinarySample.CQS_Violation C# (CSharp) Method

CQS_Violation() public method

CQS is not always applicable. Operations with Dictionary have a prime example of TryGetValue: returns boolean for success and populates out-variable with value.
public CQS_Violation ( ) : void
return void
        public void CQS_Violation()
        {
            String result;

            if (dictionary.TryGetValue("someKey", out result))
            {
                // key found, `result` is populated
            }
        }