What's Here?
- Members: 119,692
- Replies: 437,884
- Topics: 67,749
- Snippets: 2,424
- Tutorials: 642
- Total Online: 2,096
- Members: 90
- Guests: 2,006
Who's Online?
|
Welcome to Dream.In.Code |
|
|
Getting VB.NET Help is Easy!
Join 119,692 VB.NET Programmers for FREE! Ask your question and get quick answers from experts. There are 2,096 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
|
Convert Between Binary, Octal, Decimal & Hexidecimal.
|
Submitted By: AdamSpeight2008
|
|
Rating:

|
|
Views: 232 |
Language: VB.NET
|
|
Last Modified: July 2, 2008 |
Snippet
Private Function FromBaseToBase(ByRef s As String, ByVal fromBase As Integer, ByVal ToBase As Integer) As String
If (fromBase <> 2) Or (fromBase <>8) or (fromBase<>10) or (fromBase<>16) Then Return ""
If (ToBase<> 2) Or (ToBase<>8) or (ToBase<>10) or (ToBase<>16) Then Return ""
If s.length=0 then return ""
' Convert (Convert to from base) to ToBase
Return Convert.ToString(Convert.ToInt32(s, fromBase), ToBase)
End Function
Copy & Paste
|
|
|
Reference Sheets
Bye Bye Ads
Free DIC T-Shirt
Related Sites
Monthly Drawing
Partners
Top Contributors
Top 10 Kudos This Month
|