foreach (object command in faces[num].command) { int k; if (command is vertex) { System.Console.WriteLine( command.x ); } } 'object' does not contain a definition for 'x' and no extension method 'x' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)