foreach (IndexingField field in document.IndexingFields)
{
if (field.TableColumn.ToLower() == "esig"&& field.Data != null && !string.IsNullOrEmpty(field.Data.ToString()) && field.Data.ToString() != "N")
{
EsigBase64Value = field.Data.ToString();
field.Data = "Y";
}
}
this is for each loop i am using , i would like to convert this for each loop to lambda expression ,please help me on this
EsigBase64Value? The way the code is written, it will only contain the contents of the last field after the loop. This is almost certainly a bugToList().ForEach()combo or create extension method yourself.field.Data's type? Why the calls toToString()?field.Data.ToString() != "N"will only work ifDatais already astring. Theifcondition could be simplified a lot