Example #1
0
 void PrintStarts(SomeObject o)
 {
     if (o?.Inner?.Value is int i)
     {
         WriteLine(new string('*', i));
     }
 }
Example #2
0
        void OldPrintStarts(SomeObject o)
        {
            var value = o?.Inner?.Value;

            if (value.HasValue)
            {
                WriteLine(new string('*', value.Value));
            }
        }