小编Cis*_*ega的帖子

C#Basic OOP - 使用构造函数创建类的字典

我一直在尝试的代码和出了什么问题:http://ideone.com/cvLRLg

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    public class Minion
    {
        public static int manaCost;
        public static int attack;
        public static int health;
        public static string cardText;
        public Minion(int mana, int atk, int h, string txt)
        {
            manaCost = mana;
            attack = atk;
            health = h;
            cardText = txt;
        }
        public void displayStats(string name)
        {
            Console.WriteLine(name + "\nMana Cost: " + manaCost + "\nAttack: " + attack + "\nHealth: " + health …
Run Code Online (Sandbox Code Playgroud)

c# oop dictionary class list

4
推荐指数
1
解决办法
119
查看次数

标签 统计

c# ×1

class ×1

dictionary ×1

list ×1

oop ×1