で表示されます。のC# - リストを作成し、更新するリストを使用し、定期的にこれは私が目指しています何であるアプリケーション
クラスシャツは実装しています
-Aパブリック列挙をシャツのサイズを一覧表示します三つのパラメータ定義(L、M、S、XL及びXXL)
-Aコンストラクタ:色、材料およびサイズ
読み取り専用-Three自動実装プロパティ:色、材料およびサイズ
をアプリケーションクラスShirtDemo:
-Uses定期型シャツのパラメータを定義するアプリケーション
-Implements一つの方法で表示されているシャツのリストを作成し、更新するためにC#ジェネリッククラスリスト。方法は
シャツ(シャツのすなわち、実際の素材、色やサイズ)の詳細を表示するための責任があるこれは私が持っているものですが、それはリストを作ることになると詰まります出力表示:リストを作成するには
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cooper_ShirtDemo
{
public enum Sizes { S, M, L, XL, XXL };
class Shirt
{
public Shirt(string material, string color, Sizes size)
{
this.Material = material;
this.Color = color;
this.Size = size;
}
public Shirt()
{
}
public string Material
{
get;
}
public string Color
{
get;
}
public Sizes Size
{
get;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cooper_ShirtDemo
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("*** List Of Shirts ***");
Console.WriteLine();
}
public static void Display(List<string> Shirts)
{
Console.WriteLine("Material Color Size");
}
}
}
実装に問題がありますか? –