我想将字符串的内容用作语句,例如:
string exampleString = "exampleStatement";
exampleString.exampleMethod();
在我的实际程序中使用它如下
XmlReader reader = XmlReader.Create(url);
SyndicationFeed feed = SyndicationFeed.Load(reader);
reader.Close();
string field = "PublishDate";
foreach (SyndicationItem item in feed.Items)
{
data = item.field.ToString();
}
return data;
这可能吗?