+
+ if (valueToProcess != 0) {
+#if NET_2_0
+ if (typeName != null)
+ throw new InvalidOperationException (string.Format (CultureInfo.CurrentCulture,
+ "'{0}' is not a valid value for {1}.", value, typeName));
+ else
+ throw new InvalidOperationException (string.Format (CultureInfo.CurrentCulture,
+ "'{0}' is not a valid value.", value));
+#else
+ return value.ToString ();
+#endif
+ }
+ if (sb.Length == 0 && zeroValue != -1) {
+ sb.Append (values[zeroValue]);
+ }
+ return sb.ToString ();