Preview:
private Entity RetrieveEntityById(IOrganizationService service, string strEntityLogicalName, Guid guidEntityId)

       {

           Entity RetrievedEntityById= service.Retrieve(strEntityLogicalname, guidEntityId, newColumnSet(true)); //it will retrieve the all attrributes

           return RetrievedEntityById;

       }

How to call?

Entity entity = RetrieveEntityById(service, "account", guidAccountId);
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter