Click here to Skip to main content
15,903,175 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to use ConfigurationManager to modifying "applicationSettings" section of App.config using .NET (C#) Visual Studio2005 Pin
Manas Bhardwaj30-Jan-09 2:10
professionalManas Bhardwaj30-Jan-09 2:10 
AnswerRe: How to use ConfigurationManager to modifying "applicationSettings" section of App.config using .NET (C#) Visual Studio2005 Pin
Najmal31-Jan-09 4:50
Najmal31-Jan-09 4:50 
AnswerRe: How to use ConfigurationManager to modifying "applicationSettings" section of App.config using .NET (C#) Visual Studio2005 Pin
Thomas_Mathews1-Feb-09 23:03
Thomas_Mathews1-Feb-09 23:03 
QuestionXor the hex values Pin
M. J. Jaya Chitra30-Jan-09 1:51
M. J. Jaya Chitra30-Jan-09 1:51 
AnswerRe: Xor the hex values Pin
musefan30-Jan-09 2:05
musefan30-Jan-09 2:05 
GeneralRe: Xor the hex values Pin
M. J. Jaya Chitra30-Jan-09 2:11
M. J. Jaya Chitra30-Jan-09 2:11 
GeneralRe: Xor the hex values Pin
musefan30-Jan-09 2:20
musefan30-Jan-09 2:20 
GeneralRe: Xor the hex values Pin
musefan30-Jan-09 2:19
musefan30-Jan-09 2:19 
this not very effiecnt but something along lines should work:

string HexToBinary(string hexString)
{
string result = "";
foreach(char c in hexString)
{

switch(c){
case '0':
 result += "0000";
case '1':
 result += "0001";
...
case 'F':
 result += "1111";
}
}

return result;
}

string BinaryToHex(string binString)
{
string result = "";
for(int i = 0; ; < binString.length / 4; i++)
{
    string temp = binString[0] + binString[1] + binString[2] + binString[3];
     binString = binString.Substring(4, binString.Length - 1);

  switch(temp){
case "0000":
   result += "0";
...

case "1111":
   result += "F";
}
}
return result;
}
string XORStrings(string s1, string s2)
{
   string bin1 = HexToBinary(s1);
   string bin2 = HexToBinary(s2);

string result = "";
   for(int i = 0; i < bin1.length; i++)
   {
     if(bin1[i] == bin2[i])//either both 0 or both 1
           result += "0";
     else //both are different i.e. 1 and 0 or 0 and 1
           result += "1";
   }
 return BinaryToHex(result);

}


LOL dont even know if will work, plus if your hex string are different lengths you may need to account for that in the XORStrings method, i.e. add 0's to start of bin2 to match bin1 length
GeneralRe: Xor the hex values Pin
M. J. Jaya Chitra30-Jan-09 18:07
M. J. Jaya Chitra30-Jan-09 18:07 
GeneralRe: Xor the hex values Pin
cevikcaner3-Sep-09 20:40
cevikcaner3-Sep-09 20:40 
AnswerRe: Xor the hex values Pin
harold aptroot30-Jan-09 2:47
harold aptroot30-Jan-09 2:47 
QuestionExecuting an exe with C# code Pin
MatthysDT30-Jan-09 1:36
MatthysDT30-Jan-09 1:36 
AnswerRe: Executing an exe with C# code Pin
musefan30-Jan-09 1:38
musefan30-Jan-09 1:38 
GeneralRe: Executing an exe with C# code Pin
MatthysDT30-Jan-09 1:48
MatthysDT30-Jan-09 1:48 
GeneralRe: Executing an exe with C# code Pin
musefan30-Jan-09 1:58
musefan30-Jan-09 1:58 
GeneralRe: Executing an exe with C# code Pin
MatthysDT30-Jan-09 2:06
MatthysDT30-Jan-09 2:06 
GeneralRe: Executing an exe with C# code Pin
Ankit Rajpoot30-Jan-09 2:18
Ankit Rajpoot30-Jan-09 2:18 
GeneralRe: Executing an exe with C# code Pin
MatthysDT30-Jan-09 2:30
MatthysDT30-Jan-09 2:30 
GeneralRe: Executing an exe with C# code Pin
musefan30-Jan-09 2:25
musefan30-Jan-09 2:25 
GeneralRe: Executing an exe with C# code Pin
MatthysDT30-Jan-09 2:33
MatthysDT30-Jan-09 2:33 
QuestionHow secure Pin
ziwez030-Jan-09 0:42
ziwez030-Jan-09 0:42 
AnswerRe: How secure Pin
musefan30-Jan-09 1:04
musefan30-Jan-09 1:04 
QuestionPDF creation library in C sharp Pin
Sudhir Mangla30-Jan-09 0:25
professionalSudhir Mangla30-Jan-09 0:25 
AnswerRe: PDF creation library in C sharp Pin
VoidMainVoid30-Jan-09 0:30
VoidMainVoid30-Jan-09 0:30 
AnswerRe: PDF creation library in C sharp Pin
sw_tech12330-Jan-09 1:02
sw_tech12330-Jan-09 1:02 

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.