枚举的DataSet [英] Enum in DataSet

查看:213
本文介绍了枚举的DataSet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的数据集到我的C#程序与SQL数据库的连接。我想其中的一列是一个枚举,我希望它作为我的代码中的枚举。我怎样才能做到这一点?

I'm using DataSet to connect my C# program with SQL database. I want one of the columns to be an enumeration and I want it to act as an enum in my code. How can I do this?

推荐答案

我并不是爆大家的泡沫,但你可以很容易的整数映射到一个使用强类型DataSet中枚举。我做这一切的时候。而不是键入整个事情在这里我已经创建了一个的在我的博客在详细描述入门如何做到这一点。

I don't mean to burst everyone's bubble, but you can easily map an integer to an Enum using a Strongly Typed DataSet. I do it all the time. Rather than type the whole thing out here I have created an entry on my Blog describing in detail how to accomplish this.

这篇关于枚举的DataSet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆