private static void CheckCoordVar( string s ) { if ( string.IsNullOrWhiteSpace( s ) || ( s != "x" && s != "y" && s != "z" ) ) throw new ArgumentException( "expected assignment of x, y, or z (e.g. x=2*t)" ); }