Here BranchAdmin is person or group column and from the below code i want to remove the value BranchAdmin column when the username equals to branch admin name.
try
{
foreach (SPListItem item in branchList.Items)
{
string strBranchAdmin = Convert.ToString(item["BranchAdmin"]);
if (strBranchAdmin == Username)
{
item["BranchAdmin"] = string.Empty;
}
}
branchList.Update();
}
catch (Exception ex)
{
}