从数据库中调用字符串值
因此,我的Oracle表中有一个单元格,其值将是某些系统函数或某些静态属性,例如datetime.now.year
。
在表单元格中,类型为varchar2
在.net
其字符串中。
如何为每种情况(属性,静态函数)生成一个通用代码以获取字符串中的值
string str = "DateTime.Now.Year" // the value comes from DataBase
var valueFromDataBase = str.invoke();
So I have a cell in my Oracle table, its value will be some System function or some Static Property like DateTime.Now.Year
.
at the table cell the type is VARCHAR2
in .Net
its string.
How can I produce a Generic Code for each case (Property, static Function) to get the value in the string
string str = "DateTime.Now.Year" // the value comes from DataBase
var valueFromDataBase = str.invoke();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑到您正在使用反射存储类型和属性,
您现在可以扭转该过程
Considering you're storing a type and a property
using reflection you can now reverse the process