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

  • Home
  • SEARCH
  • 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 9217421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:37:50+00:00 2026-06-18T02:37:50+00:00

We’re constructing a buffer of bytes to send out on a .Net Socket Send()

  • 0

We’re constructing a buffer of bytes to send out on a .Net Socket Send() method to some factory equipment so the byte order matters. But I’ve noticed that even when I use “[StructLayout(LayoutKind.Sequential,” the Visual Studio 2010 debugger shows a different sequence than I specify. For example,

  [StructLayout(LayoutKind.Sequential, Pack = 1)]
  public class K_NEWFILEGET_START
  {
      public K_HEADER Header = new K_HEADER();
      [System.Runtime.InteropServices.MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
      public byte[] fileName = new byte[32];
      public globals.INT2_Type crc = new globals.INT2_Type();
  }

then I do a

 K_NEWFILEGET_START msg = new K_NEWFILEGET_START();

In the debugger it shows . . .

-    msg      {xxxxx.yyy.K_NEWFILEGET_START}        
+    crc      {xxxxx.globals.INT2_Type}     
+    fileName {byte[32]}                        
+    Header   {xxxxx.yyy.K_HEADER}

(proprietary stuff xxx’ed out) In this example it’s in the reverse order but I have other examples where the displayed order in the debugger is scrambled in different ways.

If I take it one step further and examine the actual output on the network, using a network sniffer, it seems to be in the correct order I specified, so the debugger seems to be the problem but I’d like to see it correctly. BTW I do have “show raw structure of objects in variables windows” set in the debugger options.
Thanks in advance!

  • 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-18T02:37:50+00:00Added an answer on June 18, 2026 at 2:37 am

    The debugger is showing you the members in alphabetical order.

    That’s usually more convenient when debugging large structures withe a lot of stuff in them.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.