I have a List. I want to loop over the list and print the values out in a more friendly manner than just o.ToString() in case some of
Here's a working example with comments. It uses a generic Dictionary of Type and Lambda Func.
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication1
{
class Program
{
// a custom class
public class MyPerson
{
public string FN { get; set; }
public string LN { get; set; }
}
static void Main(string[] args)
{
// your prebuilt dictionary of Types to Lambda expressions to get a string
Dictionary> MyToStringLookup = new Dictionary>()
{
{typeof(String), new Func