• Welcome to Valhalla Legends Archive.
 

[VB.NET] Signed/Unsigned Data Types?

Started by BaDDBLooD, February 06, 2005, 12:37 PM

Previous topic - Next topic

MyndFyre

mmm, then that's change from the most recent "official" release.  My libraries still show it flagged for non-CLS-compliant.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

shout


MyndFyre

Quote from: shout on February 08, 2005, 11:04 AM
Does this really matter?

Yes; if the types are CLS-compliant, that means that any language that supports .NET *must* support these features.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.


l)ragon

SByte to Byte, Byte to SByte enjoy
    Public Function ByteToSByte(ByVal bytAr As Byte) As SByte
        Dim sbytOut As SByte

        sbytOut = SByte.Parse((bytAr - 128).ToString)

        Return sbytOut
    End Function

    Public Function SByteToByte(ByVal bytAr As SByte()) As Byte()
        Dim i As Integer
        Dim sbytOut(bytAr.Length - 1) As Byte

        For i = 0 To (bytAr.Length - 1)
            sbytOut(i) = Val(bytAr(i).ToString) + 128
        Next

        Return sbytOut
    End Function

    Public Function SByteToByte(ByVal bytAr As SByte) As Byte
        Dim sbytOut As Byte

        sbytOut = Val(bytAr.ToString) + 128

        Return sbytOut
    End Function

    Public Function ByteToSByte(ByVal bytAr As Byte()) As SByte()
        Dim i As Integer
        Dim sbytOut(bytAr.Length - 1) As SByte

        For i = 0 To (bytAr.Length - 1)
            sbytOut(i) = SByte.Parse((bytAr(i) - 128).ToString)
        Next

        Return sbytOut
    End Function
No idea why you want this however this is one way of doing the conversion.
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*