От: | nerozero | ||
Дата: | 11.12.06 11:00 | ||
Оценка: |
//value = значение типа int,bool,double....
MethodInfo mi = typeof(XmlConvert).GetMethod("ToString", new Type[1] { value.GetType() });
if (mi == null)
throw new Exception("Cannot convert '" + value.GetType().FullName + "' to XmlString");
xmlText = (string)mi.Invoke(null, new object[1] { value });