1
Vote

SA0102 on an indexed property (c# 6 syntax)

description

    public class CacheTargetCollection : ConfigurationElementCollection
    {
             public new CacheTargetElement this[string key] => (CacheTargetElement)this.BaseGet(key);
    }
StyleCop.MSBuild.4.7.59.0 generates the error pointing to the property line:
Warning SA0102 : CSharp.CsParser : A syntax error has been discovered in file C:....\CacheTargetCollection.cs on line 15.

comments