我正在寻找以下错误的帮助:
'Practical_2.Card'是'类型',但用作'变量'
这是我的代码:
class Tester
{
static void Main(string[] args)
{
Card[] hand = {
new Card("Spade", 3),
new Card("Club", 10),
new Card("Diamond", 11),
new Card("Heart", 9),
new Card("Diamond", 13),
};
ProcessHand(hand);
}//end of static void main
static void ProcessHand(Card[] cards)
{
Console.WriteLine("{0,-10:s}: {1,-10:i}", "suit: ", Card[0]);
}//end of static void processhand
}//end of class Tester
class Card
{
public string suit { get; set; }
public int facevalue { get; set; }
public Card (string su, int fa)
{ …Run Code Online (Sandbox Code Playgroud)