Expand|Select|Wrap|Line Numbers
- Type t = _Item.GetType();
- foreach (DataRow r in dtIT.Rows)
- {
- foreach (PropertyInfo p in t.GetProperties())
- {
- //assign any matching column names to object properties
- if (dtIT.Columns[p.Name] != null)
- {
- if (!(r[p.Name].GetType is p.GetType))
- {
- //convert type if possible
- }
- p.SetValue(_Item, r[p.Name], null);
- }
- }
Error 1 The type or namespace name 'p' could not be found (are you missing a using directive or an assembly reference?) ...\Classes\ItemTreeData.cs 61 55 DAL
Can anyone tell me what I'm doing wrong or have any suggestions for me? Thanks!