Jump to content

Array com ciclo for


tx-oliveira
 Share

Recommended Posts

Viva Pessoal,

Eu tenho um duvida que é a seguinte:

tenho um ciclo For

Recebo numa variavel numeros que convento em hexadecimal e quero fazer um array.

Como funciona a funçao Ubound ?

Tenho o seguinte codigo:

responseData = System.Text.Encoding.Default.GetString(data, 0, bytes)

		Dim Ritorno As Byte()
		Dim Lunghezza As Integer
		Ritorno = New [byte](256) {}
		Lunghezza = ConvByte(data, Ritorno)

		Dim Ii As Integer
		Dim dataOggi(6) As String

		Dim i As Integer

		For Ii = 4 To Lunghezza + 3
			dataOggi(i) = Hex(Convert.ToInt16(Ritorno(Ii)))

			For i = 0 To UBound(dataOggi)
				TextBox1.Text += dataOggi(0)
			Next

		Next
Link to comment
Share on other sites

Boas podes ver sobre essa função aqui: https://msdn.microsoft.com/en-us/library/95b8f22f%28v=vs.90%29.aspx?f=255&MSPPError=-2147217396

Mas resumidamente vai-te dar o valor da posição na dimensão pretendida..

Boa sorte.

Férias! Estou por aqui: http://maps.google.p...001549&t=h&z=20 (a bulir claro está!)

Nunca mais é verão outra vez.. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.