Skip to content

Problem in Chapter 18 #2

@ShervanN

Description

@ShervanN

Hi,

In chapter 18, page 587, In Dependency Injection section, In my opinion the following code is incomplete.

What is PlayHand? Is it a method?

public interface ICardGameClient
{
void Player(string Name);
}
public class PlaySomeCards
{
private readonly ICardGameClient _cardGameClient;
public PlaySomeCards(ICardGameClient cardGameClient)
{
_cardGameClient = cardGameClient;
}
public PlayHand // Is it true? Shouldn't it be --> public void PlayHand() ? 
{
_cardGameClient.Player("Benjamin");
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions