Kevin McKneish, a fellow MVP, wrote an interesting tip:
You can convert a string to an enumerated value by using Enum.Parse(). For example, the following code converts the string "Int32" to the corresponding System.Data.DbType enum value:Useful stuff.Param.DbType = (DbType)Enum.Parse(typeof(DbType), "Int32", true);
No comments:
Post a Comment