asp.net - Place Dynamically Generated Objects in an Array (or Collection)? -


i created custom class custom object. instantiate so:

dim class_info new class_level 

then use linq-to-entities query pull information:

dim get_config = p in dbcontext.configs _     p.type = "classdate" _     select p 

then have for..each loop want create instance of object information so:

    each row in get_config         dim the_row = row         class_info.class_level = the_row.description         class_info.dateo = the_row.datevalue         class_info.timeo = the_row.timevalue         class_info.datec = the_row.datevalue         class_info.timec = the_row.timevalue         class_info.query = "q" + the_row.description     next 

now, have 2 problems. first, right overwriting same object properties, again, , again. need somehow dynamically name object. then, need place these objects in array can iterate through them...

what should project query type directly:

dim class_infos = p in dbcontext.configs _                   p.type = "classdate" _                   select new class_level {                      .prop = p.prop                      ' other properties here                   } 

then end ienumerable of class_level, think want?

you should consider naming things bit better it's hard understand working here.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -