Matt <(E-Mail Removed)> wrote:
> > It would really help if:
> >
> > a) you could post a short but *complete* program - one we can actually
> > compile and run, without having to fix up a load of the code
>
> What exactly did you have to "fix up"? I copied the code into a new console
> project and it ran fine without any modification.
Sorry, but you really didn't. Your code doesn't declare a class, to
start with...
In fact, putting the code in a class was all that needed doing - but
that was made fairly unclear due to the formatting of the code. For
instance, the first code block:
private const string MY_PASSWORD = "test"; private const string
SOURCE_XML_FILE_PATH = @"C:\Sample.xml"; private const string
ENCRYPTED_FILE_PATH = @"C:\Sample.xmle";
would have been rather clearer as:
private const string MY_PASSWORD = "test";
private const string SOURCE_XML_FILE_PATH = @"C:\Sample.xml";
private const string ENCRYPTED_FILE_PATH = @"C:\Sample.xmle";
Similarly, at first sight Main (as posted) doesn't appear to have any
closing brace - it's "hidden" at the end of the line.
It's worth considering how the code will appear to someone else when
posted, bearing in mind that that person will never have seen the code
before.
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too