小编dr4*_*ul4的帖子

Linq 分组除列

我有一个包含大量属性的类,我需要按几乎所有列对其进行分组。

class Sample {
    public string S1 { get; set; }
    public string S2 { get; set; }
    public string S3 { get; set; }
    public string S4 { get; set; }
    // ... all the way to this:
    public string S99 { get; set; }

    public decimal? N1 { get; set; }
    public decimal? N2 { get; set; }
    public decimal? N3 { get; set; }
    public decimal? N4 { get; set; }
    // ... all the way to …
Run Code Online (Sandbox Code Playgroud)

c# linq grouping

5
推荐指数
1
解决办法
1374
查看次数

标签 统计

c# ×1

grouping ×1

linq ×1