RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
c#中的命名实参

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

创新互联专业为企业提供海口网站建设、海口做网站、海口网站设计、海口网站制作等企业网站建设、网页设计与制作、海口企业网站模板建站服务,十载海口做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

namespace ConsoleApplication1
{
class Program
{

     class Class1
     {
         readonly string people;
        public string People { get {return people;} }
        readonly decimal price;
        public decimal Price { get { return price; } }
        public Class1(string people, decimal price)
        {
            this.people = people;
            this.price = price;
        }

        public static List kkk()
        {
            return new List {
    new Class1(people:"ssss",price:444m),
    new Class1(people:"44333rrr",price:666m),
    new Class1(people:"dddd",price:88m)

    };

    }
        public override string ToString()
        {
            return string.Format("{0}:{1}",people,price);
        }

        static void Main(string[] args)
        {
           foreach(Class1 jjj in kkk())
           { Console.WriteLine(jjj.people+':'+jjj.price);

           }
           Console.ReadLine();
        }
    }
}

}


网站题目:c#中的命名实参
链接URL:http://scyingshan.cn/article/iihhgc.html