SqlServer与C#中数据类型的对应关系

SqlServer与C#中数据类型的对应关系,第1张

概述private string changetocsharptype(string type)   {    string reval=string.empty;    switch(type.tolower())    {     case "int":      reval= "int32";      break;     case "text":      reval= "string"; private string changetocsharptype(string type)   {    string reval=string.empty;    switch(type.tolower())    {     case "int":      reval= "int32";      break;     case "text":      reval= "string";      break;     case "bigint":      reval= "int64";      break;     case "binary":      reval= "system.byte[]";      break;     case "bit":      reval= "boolean";      break;     case "char":      reval= "string";      break;     case "datetime":      reval= "system.datetime";      break;     case "decimal":      reval= "system.decimal";      break;     case "float":      reval= "system.double";      break;     case "image":      reval= "system.byte[]";      break;     case "money":      reval= "system.decimal";      break;     case "nchar":      reval= "string";      break;     case "ntext":      reval= "string";      break;     case "numeric":      reval= "system.decimal";      break;     case "nvarchar":      reval= "string";      break;     case "real":      reval= "system.single";      break;     case "smalldatetime":      reval= "system.datetime";      break;     case "smallint":      reval= "int16";      break;     case "smallmoney":      reval= "system.decimal";      break;     case "timestamp":      reval= "system.datetime";      break;     case "tinyint":      reval= "system.byte";      break;     case "uniqueIDentifIEr":      reval= "system.guID";      break;     case "varbinary":      reval= "system.byte[]";      break;     case "varchar":      reval= "string";      break;     case "variant":      reval="object";      break;     default:      reval= "string";      break;    }    return reval;   } 总结

以上是内存溢出为你收集整理的SqlServer与C#中数据类型的对应关系全部内容,希望文章能够帮你解决SqlServer与C#中数据类型的对应关系所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/1177376.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-02
下一篇2022-06-02

发表评论

登录后才能评论

评论列表(0条)

    保存