Revision: 9510
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 10, 2008 19:42 by rengber
Initial Code
public class LendingRates { public List<BLRate> GetLendingRates() { . . . List<DLRate> ldlr = dlObject.GetLendingRates(date); List<BLRate> lblr = ldar.ConvertAll(new Converter<DLRate, BLRate>(RateToRateConverterMethod)); return lblr } . . . public static BLRate RateToRateConverterMethod(DLRate dr) { return new BLRate(dr.Name, dr.Value); } }
Initial URL
http://msdn.microsoft.com/en-us/library/73fe8cwf(VS.80).aspx
Initial Description
This technique can convert a list of one type into a list of another in a single line given and instance to instance conversion method to be passed to the delegate constructor.
Initial Title
Generic Convert
Initial Tags
Initial Language
C#