Josephur Posted April 6, 2011 Report Share Posted April 6, 2011 I've been trying for an hour now to get a small snippet of C# code to execute after downloading a file, but to no avail :/ I even dumbed my code down to the point that it should not fal, alas no success. I would love to get C# code working and even provide the wiki with some example code on whats possible to do with it, but I cant even get a simple write to file snip to work. It works fine when compiled in a C# compiler.. such as Visual Studio 2010. Code is as follows: using (System.IO.StreamWriter outfile = new System.IO.StreamWriter("test.bin" + @".md5")) { outfile.Write("MD5_GOES_HERE"); } Link to comment Share on other sites More sharing options...
Josephur Posted April 6, 2011 Author Report Share Posted April 6, 2011 Issue resolved, Ketarin is not as friendly as Visual Studio when dealing with line breaks. Make sure all of your code is on a single line for things such as: using (System.IO.StreamWriter outfile = new System.IO.StreamWriter("test.bin" + @".md5")) and not using (System.IO.StreamWriter outfile = new System.IO.StreamWriter("test.bin" + @".md5")) Link to comment Share on other sites More sharing options...
floele Posted April 10, 2011 Report Share Posted April 10, 2011 What kind of error did you get? The same code works fine for me, even with newlines. Shouldn't actually be a problem, since Ketarin and VS use the same compiler basically. Link to comment Share on other sites More sharing options...
Josephur Posted April 10, 2011 Author Report Share Posted April 10, 2011 I never recieved any errors, however ... again now that I've reformatted this seems to be working as well.. I have no idea what the heck is going on, LOL Link to comment Share on other sites More sharing options...
floele Posted April 11, 2011 Report Share Posted April 11, 2011 OK, let me know if you ever experience a problem again, it should all work fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now