•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 401,490 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,196 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 198 | Replies: 1
![]() |
•
•
Join Date: May 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I Have Been Trying For Days To Convert This VB.Net Code into CSharp With *NO* Success.
I Have Tried Everything I Can, But My Knowledge of C# is Lacking.
Any Conversions Would Be Very Greatly Appreciated.
Private Function CharHash(ByVal Data As String) As String
Dim Temp As String = Nothing
Dim Result As String = Nothing
''
Dim i As Int64
''
For i = 1 To Len(Data) Step 2
Temp = Chr(Val("&H" & Mid(Data, i, 2)))
Result = Result & Temp
Next
''
Return Result
End FunctionI Have Tried Everything I Can, But My Knowledge of C# is Lacking.
Any Conversions Would Be Very Greatly Appreciated.
•
•
Join Date: Nov 2007
Location: ★ Jogja ★
Posts: 2,473
Reputation:
Rep Power: 9
Solved Threads: 215
try this :
c# Syntax (Toggle Plain Text)
private string CharHash(string Data) { string Temp = null; string Result = null; //' long i; //' for (i = 1; i <= Data.Length; i += 2) { Temp = System.Convert.ToString(Strings.Chr((int) (Conversion.Val("&H" + Data.Substring((int) (i - 1), 2))))); Result = Result + Temp; } //' return Result; }
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Lost on structs (C++)
- completely lost (C++)
- Help!!!So lost (C++)
- Lost MSN Explorer (Windows Software)
- Completely confused (C)
- Completely Lost : ( Can anyone help (Java)
- vBulletin technical assistance (Existing Scripts)
- Red Hat 9 on VMWare 4 (*nix Software)
- ALICE Sucks (DaniWeb Community Feedback)
Other Threads in the C# Forum
- Previous Thread: Trying to use List.Exists in C#
- Next Thread: C# To java convertor



Linear Mode