I've seen this example to build and send an attachment to Salesforce in Java, but how is this accomplished in C#?
I'm also using this page as a reference, but I still don't know how to finish the last part where I try to create and save the attachment.
SoapClient client =newSoapClient();
LoginResult lr = client.login(newLoginScopeHeader(), username, password);
FileInfo fileInfo =newFileInfo(myFileLocation);
FileStream stream =File.OpenRead(myFileLocation);
byte[] byteArray =newbyte[fileInfo.Length];
stream.Read(byteArray,0, byteArray.Length);
Attachment attachment =newAttachment();
attachment.Body= byteArray;attachment.Name= myFileName +".txt";attachment.IsPrivate=false;
SaveResult saveResult = client.create(new sObject[]{ attachment })[0];