码迷,mamicode.com
首页 > Windows程序 > 详细

C#面向对象编程练习

时间:2015-05-29 20:22:57      阅读:299      评论:0      收藏:0      [点我收藏+]

标签:

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();
        }
    }
}

C#面向对象编程练习

标签:

原文地址:http://blog.csdn.net/lucky51222/article/details/46240255

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!