您的位置:首页 > 移动开发 > Objective-C

DataColumn 与Xml data type转换。

2008-01-16 23:22 363 查看
下面代码通过反射System.Data程序集得到

string XmlDataTypeName(Type type)
{
(type == (char))
{
;
}
((type == (byte[])) || (type == (SqlBytes)))
{
;
}
((type == (DateTime)) || (type == (SqlDateTime)))
{
;
}
(type == (TimeSpan))
{
;
}
(((type == (decimal)) || (type == (SqlDecimal))) || (type == (SqlMoney)))
{
;
}
(type == (int))
{
;
}
((type == (bool)) || (type == (SqlBoolean)))
{
;
}
((type == (float)) || (type == (SqlSingle)))
{
;
}
((type == (double)) || (type == (SqlDouble)))
{
;
}
((type == (sbyte)) || (type == (SqlByte)))
{
;
}
(type == (byte))
{
;
}
((type == (short)) || (type == (SqlInt16)))
{
;
}
((type == (int)) || (type == (SqlInt32)))
{
;
}
((type == (long)) || (type == (SqlInt64)))
{
;
}
(type == (ushort))
{
;
}
(type == (uint))
{
;
}
(type == (ulong))
{
;
}
(type == (Uri))
{
;
}
(type == (SqlBinary))
{
;
}
(((type == (string)) || (type == (SqlGuid))) || ((type == (SqlString)) || (type == (SqlChars))))
{
;
}
((type != (object)) && (type != (SqlXml)))
{
string.Empty;
}
;
}

 
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  xml string byte float object