Are there any improvements I can make to my implementation of the strategy pattern?
You can do this more elegantly by specifying a Func delegate instead of an enum and a set of interfaces.

class Program
{
    static void Main(string[] args)
    {
        string message = "mytext";

        Changer chng = new Changer();

        string messageModified = chng.Change(message, Strategy2); 
    }

    // These methods have a Func&lt;string,string&gt; signature
    // i.e. accept string as parameter and return a string
    static string Strategy1(string input)
    {
        return "hello1";
    }
    static string Strategy2(string input)
    {
        return "hello2";
    }
}

public class Changer
{
    public Changer()
    {
    }

    private Func&lt;string,string&gt; _stringModifier;

    public void SetStringModifier(Func&lt;string,string&gt; stringModifier)
    {
        this._stringModifier = stringModifier;
    }

    public string Change(string text, Func&lt;string,string&gt; stringModifier)
    {
        SetStringModifier(stringModifier); // why?

        return _stringModifier(text);
    }
}



  what was meant by the comment //why?


I would have thought that one of the following might be better.

Either, set the strategy once and use it repeatedly, like this ...

public class Changer
{
    public Changer()
    {
    }

    private Func&lt;string,string&gt; _stringModifier;

    public void SetStringModifier(Func&lt;string,string&gt; stringModifier)
    {
        this._stringModifier = stringModifier;
    }

    public string Change(string text)
    {
        return _stringModifier(text);
    }
}


... or like this ...

public class Changer
{
    public Changer(Func&lt;string,string&gt; stringModifier)
    {
        this._stringModifier = stringModifier;
    }

    private Func&lt;string,string&gt; _stringModifier;

    public string Change(string text)
    {
        return _stringModifier(text);
    }
}


Or, pass the strategy into the Change method every time, in which case there's no need to store it in as member data, like this ...

public class Changer
{
    public Changer()
    {
    }

    public string Change(string text, Func&lt;string,string&gt; stringModifier)
    {
        return stringModifier(text);
    }
}



  Thank you, another question is, wouldn't this allow the user to just write their own strategy and pass it to chng.Change() method?


Yes it would. That's often a good thing: it makes the class more 'flexible', so that it can be used in ways you hadn't imagined.


  And if my end goal is to make this an API, is that acceptable? Should I restrict them like I did in my original post using the enumeration?


I don't know. If you want to keep the enum, you could still use a Func delegate instead of an interface with several subclasses (and use a switch statement instead of repeated if/else).

public class Changer
{
    public Changer()
    {
    }

    private Func&lt;string,string&gt; _stringModifier;

    public void SetStringModifier(Types type)
    {
        switch (type)
        {
            case Types.Type1:
                this._stringModifier = Strategy1;
                break;
            case Types.Type2:
                this._stringModifier = Strategy2;
                break;
            default:
                throw new NotImplementedException();
    }

    public string Change(string text)
    {
        return _stringModifier.Modify(text);
    }

    static string Strategy1(string input)
    {
        return "hello1";
    }
    static string Strategy2(string input)
    {
        return "hello2";
    }
}