I wasn't sure how to title this question correctly but here is what i'm trying to do.
Say I have a class Customer that has an ID, firstName, and lastName field. Now say I have a list of customers and I want to write one method that will write ID, firstName, OR lastName to the console depending on which one I specify.
In essense, I would like to write one method that accepts the field I would like to print out instead of writing three seperate methods to print out each field type.
I know I have read about how to do this in C# over the past few days but my brain is on overload and it is slipping my mind....
Any help would be appreciated.