publicstringDownloadFile(inttype,intid,intversion,intfileid){// Construct the URL by filling type, id, version and file id.stringurl=string.Format("http://example.org/REST/objects/{0}/{1}/{2}/files/{3}/content",type,id,version,fileid);// Create the web request.WebRequestrequest=WebRequest.Create(url);// Fill the authentication information.request.Headers["X-Authentication"]=this.AuthenticationToken;// Receive the response.varresponse=request.GetResponse();returnnewStreamReader(response.GetResponseStream()).ReadToEnd();}