C#面向對象編程練習
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
public class apple
{
public string info;
public apple()
{
}
public string app(string[] a)
{
foreach (string value in a)
info += value + "+";
info=info.Substring(0,info.Length-1);
return info;
}
}
static void Main(string[] args)
{
string[]b = new string[]{"Hello","GeoStrom","Haha"};
apple A = new apple();
Console.WriteLine(A.app(b));
Console.WriteLine();
}
}
}