Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9220285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:18:43+00:00 2026-06-18T03:18:43+00:00

In vb.net, how to convert a 32 bit integer to 2 shorts? and reconstruct

  • 0

In vb.net, how to convert a 32 bit integer to 2 shorts? and reconstruct them?

The first 16 bit will go to the first value, the last 16 bits will go to the second value

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:18:44+00:00Added an answer on June 18, 2026 at 3:18 am

    You can use the BitConverter class.

    dim i16a, i16b as short
    dim i32 as integer = somevalue
    dim b() as byte
    
    b = BitConverter.GetBytes(i32)
    i16a = BitConverter.ToInt16(b, 0)
    i16b = BitConverter.ToInt16(b, 2)
    

    You can reconstruct the same way, just copy the 4 bytes into a single array first before using BitConverter.ToInt32.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to convert from a 32 bit Dos Date to a .NET System.DateTime
I would like to be able to convert a high-valued unsigned-integer (a value that
Is there any library in .Net to convert shapefile to SQL server table? I
I started to use Json.NET to convert a string in JSON format to object
I create an encrypted e-mail verification link using .NET's Convert.ToBase64String. Seldomly, I get informed
I'm currently writing a helper function in VB.NET to convert an array of enum
Exact duplicate: .Net Parse versus Convert can anyone help me?
I'm trying to convert some VB.net code into C# and having issues trying to
I'm trying to convert come vb.net code into C# but came across optional in
I'm trying to convert an ASP.NET web application to use resource files. I haven't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.