《零基础学C#》第七章-实例03:手机默认语言更改——练习2

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wtxhai/article/details/88786436
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example703_02
{
    class Cellphone
    {
        public Cellphone()
        {
            Console.WriteLine("智能手机的默认语言为英文");
        }

        public Cellphone(String defaultLanguage)
        {
            Console.WriteLine("将智能手机的默认语言设置为" + defaultLanguage);
        }
        static void Main(string[] args)
        {
            Cellphone cellphone1 = new Cellphone();
            Cellphone cellphone2 = new Cellphone("中文");
            Console.ReadLine();
        }
    }
}

猜你喜欢

转载自blog.csdn.net/wtxhai/article/details/88786436