vendredi 26 février 2021

How to Group Class Property Members

I have a class which has properties with have common feaure with reflection i want to group this members. I mean class in the below i would like to group A and B Members. Main purpose here is to extract excel within A and B section. So my question is there any attribute for example [GroupParameter("A")] or method to achieve this.

public class LogParameters
{
    
    public byte A1{ get; set; }
    public UInt32 A2{ get; set; }
    public UInt32 A3{ get; set; }
    public byte A4{ get; set; }
    public byte A5{ get; set; }
    
    public byte B1{ get; set; }
    public UInt32 B2{ get; set; }
    public UInt32 B3{ get; set; }
    public byte B4{ get; set; }
    public byte B5{ get; set; }
}

Thanks.





Aucun commentaire:

Enregistrer un commentaire