Presumably group.SupportedProducts is actually not a string[] , but it is what supports custom conversion to string[] .
as never causes custom conversions, while casting does.
An example to demonstrate this:
using System; class Foo { private readonly string name; public Foo(string name) { this.name = name; } public static explicit operator string(Foo input) { return input.name; } } class Test { static void Main() { dynamic foo = new Foo("name"); Console.WriteLine("Casting: {0}", (string) foo); Console.WriteLine("As: {0}", foo as string); } }
source share