Convert.ToBase64 VB.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maxisking
    New Member
    • Oct 2007
    • 8

    Convert.ToBase64 VB.net

    Okay, I want to use
    Convert.ToBase6 4
    To convert www.youfail.org

    This is my line of code so far:

    Dim url As String

    url = Convert.ToBase6 4("www.youfail. org")


    How do i make it work?

    Kthxbaibai VB.net Btw :/.
    HALPPPP
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Originally posted by Maxisking
    Okay, I want to use
    Convert.ToBase6 4
    To convert www.youfail.org

    This is my line of code so far:

    Dim url As String

    url = Convert.ToBase6 4("www.youfail. org")


    How do i make it work?

    Kthxbaibai VB.net Btw :/.
    HALPPPP
    Code:
    string s = "hello";
    System.Text.ASCIIEncoding encoder = new ASCIIEncoding();            
    string st = Convert.ToBase64String(encoder.GetBytes(s.ToCharArray()));
    That should do what you want

    Comment

    • Maxisking
      New Member
      • Oct 2007
      • 8

      #3
      How do i make
      Code:
      Dim url As String
      
      url = System.Convert.ToBase64("www.youfail.org")
      How would i make www.youfail.org

      I dont understand your code

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        Originally posted by Maxisking
        How do i make
        Code:
        Dim url As String
        
        url = System.Convert.ToBase64("www.youfail.org")
        How would i make www.youfail.org

        I dont understand your code
        Check my previous post.
        Yes ive done it in c#, but you have to do the rest of the work to convert it to VB
        unless someone else is happy to do that for you

        Comment

        • Maxisking
          New Member
          • Oct 2007
          • 8

          #5
          Still confused. Anyone else please help :)

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Well "System.Convert .ToBase64()" doesn't even appear to exist so try this:

            [code=vbnet]
            Dim mybytes As Byte() = Encoding.ASCII. GetBytes("www.y oufail.org")
            Dim url As String = Convert.ToBase6 4String(mybytes )
            [/code]

            Comment

            • Maxisking
              New Member
              • Oct 2007
              • 8

              #7
              "Encoding" Is not Declared .. :/

              Comment

              • Shashi Sadasivan
                Recognized Expert Top Contributor
                • Aug 2007
                • 1435

                #8
                Originally posted by Maxisking
                "Encoding" Is not Declared .. :/
                have you even tried looking up msdn to check which namespace it belongs to and import that namespace?

                Its easier to search for theses things rather than post it at a forum and expect a answer in return for you....its faster if you search...
                System.text
                Last edited by Shashi Sadasivan; Oct 31 '07, 05:09 AM. Reason: Giving the namespace so that they dont post further questions on how to search using an online search engine

                Comment

                Working...