Am I going mad? c# / static modifier -


i have below code, oddly enough keeps on returning same value (even though filename) different, if call more once in same request.

ive stepped through code , stringbytes same (i.e. getbytes(string)) returning same value.

    public static string base64encodestring(string filename)     {         var stringbytes = system.text.encoding.default.getbytes(filename);         return convert.tobase64string(stringbytes);     } 

i suspect you're not seeing think you're seeing. method won't return same value if call different values of filename... unless you're using characters aren't supported encoding.default. (i wouldn't suggest using encoding.default unless really want platform-specific encoding.)


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -