User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: May 2008
Posts: 1
Reputation: gh0sts416 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gh0sts416 gh0sts416 is offline Offline
Newbie Poster

Completely Lost

  #1  
Jun 8th, 2008
I Have Been Trying For Days To Convert This VB.Net Code into CSharp With *NO* Success.

    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 Function

I Have Tried Everything I Can, But My Knowledge of C# is Lacking.
Any Conversions Would Be Very Greatly Appreciated.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: ★ Jogja ★
Posts: 2,473
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Rep Power: 9
Solved Threads: 215
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Nearly a Posting Maven

Re: Completely Lost

  #2  
Jun 8th, 2008
try this :
  1. private string CharHash(string Data)
  2. {
  3. string Temp = null;
  4. string Result = null;
  5. //'
  6. long i;
  7. //'
  8. for (i = 1; i <= Data.Length; i += 2)
  9. {
  10. Temp = System.Convert.ToString(Strings.Chr((int) (Conversion.Val("&H" + Data.Substring((int) (i - 1), 2)))));
  11. Result = Result + Temp;
  12. }
  13. //'
  14. return Result;
  15. }
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C# Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C# Forum

All times are GMT -4. The time now is 2:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC