求高手解答,急~~~~
string countryDHLId = "Area" + countryInfo.DHLArea.ToString();var info = from df in db.DHLFreights where df.WeightMax >= weight && df.WeightMin <= weight select new { countryDHLId };double dhlFreight = double.Parse(info.First().countryDHLId);string countryDHLId = "Area" + countryInfo.DHLArea.ToString();var info = from df in db.DHLFreights where df.WeightMax >= weight && df.WeightMin <= weight select GetPropertyValue(df,countryDHLId);private static object GetPropertyValue(object obj, string property){ System.Reflection.PropertyInfo propertyInfo=obj.GetType().GetProperty(property); return propertyInfo.GetValue(obj, null);}