The SL and WPF APIs both provide support for adding attachments to FeatureLayers using C#.
If you do not want to use those APIs then you can write a sample with them and then look at the request using Fiddler. Another option is to simply reflect out the code and study it.