using System.Collections; using System.Collections.Generic; using System.Linq; namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.Issue3180 { internal static class Extensions { public static int Count(this IEnumerable source) { return 5; } } internal class NullConditional { public static int StaticCall(IEnumerable s) { return Enumerable.Count(s); } public static int CountOrZero(IEnumerable s) { #if EXPECTED_OUTPUT return s?.Count() ?? 0; #else return (s != null) ? Enumerable.Count(s) : 0; #endif } } }