1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
/*
public static TOutput[] ConvertAll<TInput,TOutput> (
TInput[] array,
Converter<TInput,TOutput> converter
)
*/
public static void Main()
{
PointF[] apf = {
new PointF(27.8F, 32.62F),
new PointF(99.3F, 147.273F),
new PointF(7.5F, 1412.2F) };
Console.WriteLine();
foreach( PointF p in apf )
{
Console.WriteLine(p);
}
Point[] ap = Array.ConvertAll(apf,
new Converter<PointF, Point>(PointFToPoint));
Console.WriteLine();
foreach( Point p in ap )
{
Console.WriteLine(p);
}
} |