Hi Friends! I am new to the C#.NET. Actually i am using one function in VB.NET. Which i want to conver into C#.NET. I tried my level best, but i am not able toget correct answer.<BR>Can anyone help me inthis matter.<BR><BR>Here is the code in VB.NET<BR>---------------------------<BR>Public Function EncryptDecrypt(ByVal datain As String) As String<BR> Dim dataCnt As Long<BR> Dim intxor1 As Integer<BR> Dim intxor2 As Integer<BR> Dim dataOut As String<BR><BR>For dataCnt = 1 To Len(datain)<BR> intxor1 = Asc(Mid(datain, dataCnt, 1))<BR> dataOut = dataOut + Chr(intxor1 Xor 163) &#039;a number<BR>Next dataCnt<BR><BR> EncryptDecrypt = dataOut<BR>End Function<BR><BR>Code what i written in C#.NET<BR>---------------------------------<BR>private string EncryptDecrypt(char codeKey,string dataIn)<BR>{<BR> int dataCnt;<BR> int intxor1;<BR> string dataOut;<BR> dataOut="";<BR> dataIn=dataIn.Trim();<BR> for (dataCnt=0;dataCnt &#060; (dataIn.Length);dataCnt++)<BR> {<BR> intxor1=System.Convert.ToInt32((int)dataIn.Substri ng(dataCnt,1)[0]);<BR> dataOut = dataOut + Convert.ToChar ((intxor1) ^ 163);<BR> }<BR> return dataOut;<BR>}<BR><BR>When i pass a parameter "9999" i need to get "ลกลกลกลก"<BR><BR>In Vb.NET i am getting but not in C#.NET<BR><BR>Please help in this matter.<BR><BR>Thnaks in Advance<BR><BR>Nag K.<BR> catch (Exception ex)<BR> {<BR> System.Diagnostics.Debug.WriteLine(ex.GetBaseExcep tion().ToString());<BR> return null;<BR> }<BR> }