SharePoint 2013 on-premise
What is the difference of using:
SPSecurity.RunWithElevatedPrivileges(() =>
{
using (SPWeb web = site.OpenWeb())
{
....
}
}
with
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPWeb web = site.OpenWeb())
{
....
}
}
the first code not work, but the second code if it works.
what is the difference between the second code works and the another not?