Click here to Skip to main content
15,916,601 members
Home / Discussions / C#
   

C#

 
AnswerRe: HashTable or App.Config from db Pin
PIEBALDconsult25-Nov-10 2:59
mvePIEBALDconsult25-Nov-10 2:59 
QuestionProgress bar Pin
pancakeleh24-Nov-10 22:51
pancakeleh24-Nov-10 22:51 
AnswerRe: Progress bar Pin
JF201524-Nov-10 23:06
JF201524-Nov-10 23:06 
AnswerRe: Progress bar Pin
#realJSOP24-Nov-10 23:57
professional#realJSOP24-Nov-10 23:57 
AnswerRe: Progress bar Pin
Luc Pattyn25-Nov-10 1:43
sitebuilderLuc Pattyn25-Nov-10 1:43 
AnswerRe: Progress bar Pin
PIEBALDconsult25-Nov-10 3:36
mvePIEBALDconsult25-Nov-10 3:36 
AnswerRe: Progress bar Pin
_Erik_25-Nov-10 4:58
_Erik_25-Nov-10 4:58 
QuestionHelp converting java-script to C#. Pin
E3pO24-Nov-10 21:35
E3pO24-Nov-10 21:35 
Hello! i'm a bit baffled when it comes to converting this javascript over to C#...

Any help would be appreciated! Thank you Smile | :)

Here is the javascript:
function d(strInput) {
	strInput = decoder(strInput);
	var strOutput = "";
	var intOffset = (key + 112) / 12;
	for (i = 4; i < strInput.length; i++) {
		thisCharCode = strInput.charCodeAt(i);
		newCharCode = thisCharCode - intOffset;
		strOutput += String.fromCharCode(newCharCode)
	}
	document.write(strOutput)
}


And this is what i attempted at converting to C#.
public string decode(int key, string data)
   {
       int i;
       string strInput = base64Decode(data);
       string strOutput = "";
       int intOffset = (key + 112) / 12;
       for (i = 4; i < strInput.Length; i++)
       {
            char thisLetter = strInput[i];

           char thisCharCode = strInput[i];
         int newCharCode = thisCharCode - intOffset;

          strOutput += new String(new char[]{Convert.ToChar(newCharCode)});

       }
       return strOutput;
   }

AnswerRe: Help converting java-script to C#. Pin
AhsanS24-Nov-10 22:58
AhsanS24-Nov-10 22:58 
GeneralRe: Help converting java-script to C#. Pin
E3pO25-Nov-10 14:23
E3pO25-Nov-10 14:23 
AnswerRe: Help converting java-script to C#. Pin
E3pO25-Nov-10 17:00
E3pO25-Nov-10 17:00 
QuestionHow to add Horizontal Scrollbar to Listbox in Smart Device Application (C#) Pin
pchze24-Nov-10 21:07
pchze24-Nov-10 21:07 
AnswerRe: How to add Horizontal Scrollbar to Listbox in Smart Device Application (C#) Pin
OriginalGriff24-Nov-10 21:48
mveOriginalGriff24-Nov-10 21:48 
GeneralRe: How to add Horizontal Scrollbar to Listbox in Smart Device Application (C#) Pin
pchze24-Nov-10 21:52
pchze24-Nov-10 21:52 
GeneralRe: How to add Horizontal Scrollbar to Listbox in Smart Device Application (C#) Pin
Richard MacCutchan24-Nov-10 22:45
mveRichard MacCutchan24-Nov-10 22:45 
QuestionSelection of the list view element in large icon mode problem. Pin
Chesnokov Yuriy24-Nov-10 20:59
professionalChesnokov Yuriy24-Nov-10 20:59 
AnswerRe: Selection of the list view element in large icon mode problem. Pin
Luc Pattyn25-Nov-10 3:03
sitebuilderLuc Pattyn25-Nov-10 3:03 
QuestionEncrypting Files Pin
Anil Kumar.Arvapalli24-Nov-10 20:00
Anil Kumar.Arvapalli24-Nov-10 20:00 
AnswerRe: Encrypting Files Pin
Mycroft Holmes24-Nov-10 21:40
professionalMycroft Holmes24-Nov-10 21:40 
QuestionRestrict Access To DLL Pin
Kevin Marois24-Nov-10 7:57
professionalKevin Marois24-Nov-10 7:57 
AnswerRe: Restrict Access To DLL Pin
Not Active24-Nov-10 8:37
mentorNot Active24-Nov-10 8:37 
GeneralRe: Restrict Access To DLL Pin
Kevin Marois24-Nov-10 8:39
professionalKevin Marois24-Nov-10 8:39 
AnswerRe: Restrict Access To DLL Pin
PIEBALDconsult24-Nov-10 9:01
mvePIEBALDconsult24-Nov-10 9:01 
GeneralRe: Restrict Access To DLL Pin
Kevin Marois24-Nov-10 10:38
professionalKevin Marois24-Nov-10 10:38 
GeneralRe: Restrict Access To DLL Pin
PIEBALDconsult24-Nov-10 10:41
mvePIEBALDconsult24-Nov-10 10:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.