程式碼:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Fifth(new int[] { 1 , 2 , 3 , 4 , 5 });
Fifth(66,55,44,33,22);
Console.ReadLine();
}
private static void Fifth( params int[] fifth)
{
foreach (var v in fifth)
Console.WriteLine("foreach fifth ->{0}", v);
}
}
}
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Fifth(new int[] { 1 , 2 , 3 , 4 , 5 });
Fifth(66,55,44,33,22);
Console.ReadLine();
}
private static void Fifth( params int[] fifth)
{
foreach (var v in fifth)
Console.WriteLine("foreach fifth ->{0}", v);
}
}
}
沒有留言:
張貼留言