3
Sabit bir Listenin satır içi somutlaştırılması
Bunun gibi bir şey yapmaya çalışıyorum: public const List<String> METRICS = new List<String>() { SourceFile.LOC, SourceFile.MCCABE, SourceFile.NOM, SourceFile.NOA, SourceFile.FANOUT, SourceFile.FANIN, SourceFile.NOPAR, SourceFile.NDC, SourceFile.CALLS }; Ama maalesef bu işe yaramıyor: FileStorer.METRICS' is of type 'System.Collections.Generic.List<string>'. A const field of a reference type other than string can only be initialized with null. …