tags:

views:

39

answers:

1

Hello,

I am creating (possible a lot) of objects as a result from a WDS query. I want them strongly typed, so I created a wrapper object which extracts the data from the oledbreader.

The question is now, I want to do this for convinience:

    // Values with string[] return value
    public string[] System_Author { get; set; }
    public string   System_Author_Joined { get { return String.Join(" ",System_Author);} }

Does this cause any additional (worth worry about) calculation cost if I do not access the property. Currently it is nice to have (for DataGrid Display) but I may not need it in other cases.

Or even better, does anybody know a way to tell the DataGrid to merge string[] to display it. Currently it stays empty, even though there is data in the col (the joined col shows up nicely)

Chris

+1  A: 

If the property isn't accessed then all it will cost you is a few bytes of memory in the process as the metadata for the class will be slightly larger; this is definitely not anything to worry about. It won't have any execution time cost.

Greg Beech