Dirty, but working for both of your test cases:
double d = 0.12289;
string ds = d.ToString("R", System.Globalization.CultureInfo.InvariantCulture);
int s = (ds.IndexOf(".") + 1);
int l = ((ds.Length) - s);
string sout = ds.Substring(0, s) + ds.Substring(s+l-2, 2);
MessageBox.Show(sout);