e.g.
if (oItem.Versions[0].Level.ToString().Equals("Published") )
if (oItem.Versions[0].Level.ToString().Equals("Published") )
SPField tagField = oItem.Fields["Account"]; XmlDocument xml = new XmlDocument(); xml.LoadXml(tagField.SchemaXml); String sEntityName2 = xml.FirstChild.Attributes["RelatedFieldWssStaticName"].Value;I think a more quicker and efficient way is to do the following :
tagField.RelatedField.ToString();