Skip to content

hide property #86

Description

@b3b00

hello,

Is there a mean to not display some property of an object when wrting a table from a list of object.
given object

public class Test {
  public Guid id {get; set;}

  public string Name {get; set;}

  public int Value {get; set;}
}

For now ConsoleTable will display somethin like

Id Name Value
f6c2d340-bf5a-486c-980c-774b958967af foo 1
f6c2d340-1234-486c-980c-774b958967af bar 2

is there a way to make it display

Name Value
foo 1
bar 2

this could be something like

List<Test> tests = ....
ConsoleTable
            .From<Test>()
           .Ignore(Test x => x.Id)
            .Write();

or through a c# attribute on the property to ignore.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions