Login Register






[VB.NET]Swaping filter_list
Author
Message
[VB.NET]Swaping #1
I made this function in which you can switch values of 2 dimensions. Its not what you can call Hard but i thought sharing it wont hurt Smile

Code:
Public Function Swap(ByVal First, ByVal Second) As String Dim T T = First First = Second Second = T Return First & " " & Second End Function


How it works?

Code:
MsgBox(Swap(20, 10))

Code:
MsgBox(Swap("hello", "world"))

It can work for a types including string, integer, byte, char, long, short, decimal, ...
Pierce the life fibers with your drill.


RE: [VB.NET]Swaping #2
You could just do this Smile

Code:
Public Function Swap(ByVal First, ByVal Second) As String Return Second & " " & First End Function
[Image: rytwG00.png]
Redcat Revolution!


RE: [VB.NET]Swaping #3
oh sh*t i really feel dumb... my teacher really made me stupid XD

like using a 10 lines code for reversing a number instead of

CInt(StrReverse(CStr(number)))

coder please delete or close this thread its really humiliating :'(
Pierce the life fibers with your drill.


RE: [VB.NET]Swaping #4
Locked on request.
[Image: rytwG00.png]
Redcat Revolution!