R
Richard Everett
I just installed Service Pack 1 for the .NET Framework 3.5. The
following (greatly simplified) code now throws an exception on the
Cast<> line:
class Program
{
static void Main(string[] args)
{
int[] ints = { 1, 2, 3, 4 };
string[] strings = ints.Cast<string>().ToArray(); //
InvalidCastException
// (Unable to cast object
of type 'System.Int32' to type 'System.String'.)
}
}
Has anyone else seen this; is this a bug in SP1?
following (greatly simplified) code now throws an exception on the
Cast<> line:
class Program
{
static void Main(string[] args)
{
int[] ints = { 1, 2, 3, 4 };
string[] strings = ints.Cast<string>().ToArray(); //
InvalidCastException
// (Unable to cast object
of type 'System.Int32' to type 'System.String'.)
}
}
Has anyone else seen this; is this a bug in SP1?