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 3212818
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:52:39+00:00 2026-05-17T14:52:39+00:00

What is the maximum recommended size of a value type? I think I read

  • 0

What is the maximum recommended size of a value type? I think I read that Microsoft suggests that they are not being larger than 16 bytes, but I can’t find the reference.

  • 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-05-17T14:52:40+00:00Added an answer on May 17, 2026 at 2:52 pm

    I found a discussion and a loose recommendation on MSDN, "Using Classes and Structures in Visual Basic .NET":

    If your application makes a large number of copies of a variable, the memory required for that variable can be a factor that determines whether it should be a value type or a reference type. There is a trade-off between copying all the bytes of a value type as opposed to allocating a new reference type on the heap. The more copies of a variable your application makes, the more important this distinction becomes.

    A theoretical observation might serve as an initial guideline. Suppose you write a test application that does the following:

    [..]

    Depending on the execution platform and the loading from other tasks, you are likely to observe the following:

    • If the common data size is less than 16 bytes, the structure instance copy loop might be slightly faster than the class instance copy loop.
    • If the data size is 16 bytes, the loops might be approximately equal in timing.
    • If the data size is greater than 16 bytes, the class loop is likely to be faster.

    And later, something more definitive at Choosing Between Classes and Structures:

    Do not define a structure unless the type has all of the following characteristics:

    • It logically represents a single value, similar to primitive types (integer, double, and so on).
    • It has an instance size smaller than 16 bytes.
    • It is immutable.
    • It will not have to be boxed frequently.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any maximum count of web worker that can be run at the
What is the maximum size of a DataTable I can load into memory in
What's the maximum number of concurrent connections that a browser will make to download
I wrote a maximum() generic function in Vala. However, it does not compile. Here
Possible Duplicate: Maximum Number of Tables in MySQL Is there a recommended number of
I have an app that's built for Android 2.2, so I'm not using the
I should write an app that takes string input and computes the hash value
Maximum(:created_at) does not give the timestamp in local time format but in UTC. I
The maximum interval of timer is 2,147,483,647. it's about 25 days. But in my
For maximum load speed and page efficiency, is it better to have: An 18MB

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.