
22/06/2007, 01:10
|
| | Fecha de Ingreso: junio-2007
Mensajes: 9
Antigüedad: 17 años, 8 meses Puntos: 0 | |
Re: arreglos en vb.net - invertir Hola esta función invierte una cadena ya sea números o texto
Function invertirCadena(ByVal textoEntrada As String) As String
Dim i As Integer
Dim textoSalida As String
textoSalida = ""
For i = textoEntrada.Length To 0 Step -1
Try
textoSalida += textoEntrada.Substring(i, 1)
'MessageBox.Show(textoEntrada.Substring(i, 1))
Catch ex As Exception
End Try
Next
Return textoSalida
End Function
Aunque quizas debería mirarte Reverse
Un Saludo |