I searched for this but in vain.
Used this below code for SharePoint 2013 and works fine, but now need to develop for SharePoint 2010.
Web web = _ctx.Web; User user = web.EnsureUser(userName); user.IsSiteAdmin = true; user.Update(); _ctx.ExecuteQuery();
Any other way by which I can add user to site collection administrator in SP2010 ?
Please help me out to solve this.