using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using System.ComponentModel; namespace var_dynamic { class Program { //var stradsa = "asdasdas"; //报错 stat
比如有一个匿名对象,var result =......Select( a=>new { id=a.id, name=a.name});然后Object obj = result ;我怎么从obj 中取出 id和name ? dynamic a = obj;var bb = a.id;var cc = a.name; 如果要重复使用数据模式,那么最可行的做法是重构代码,立刻增加一个模式定义,例如 C# code ? 1 2 3 4 5 public class AA { pu
一.问题背景 产生环境:oracle数据库,hibernate操作 定义了一个表 create table STORE_INFORMATION ( id CHAR(32) not null, name VARCHAR2(254) default '', content CLOB default '', create_time VARCHAR2(26) default '', cindex NUMBER default 0, status VARCHAR2(4) default '0' not n