Jump to content
Ketarin forum

C# code not working?


Josephur
 Share

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.