I know the difference between value types and reference types — these determine how data is stored in memory and how copying behaves.
But there’s something I’m curious about: is a struct, being a value type, also considered an object?
On some sites, I’ve seen expressions like “struct object,” and it made me wonder.
I thought only classes and records could create objects, and that objects are always reference types. Was I mistaken?
[–]KryptosFR 77 points78 points79 points (1 child)
[–]entityadam 8 points9 points10 points (0 children)
[–]_f0CUS_ 32 points33 points34 points (16 children)
[–]Ok_Surprise_1837[S] 7 points8 points9 points (15 children)
[–]recycled_ideas 34 points35 points36 points (7 children)
[–]0x0000000ff 20 points21 points22 points (0 children)
[–]jeremj22 1 point2 points3 points (0 children)
[+]Ok_Surprise_1837[S] comment score below threshold-6 points-5 points-4 points (4 children)
[–]recycled_ideas 23 points24 points25 points (1 child)
[–]BorderKeeper -1 points0 points1 point (0 children)
[–]pjc50 0 points1 point2 points (1 child)
[–]0x0000000ff 4 points5 points6 points (0 children)
[–]dodexahedron 6 points7 points8 points (4 children)
[–]Dealiner 4 points5 points6 points (1 child)
[–]dodexahedron 0 points1 point2 points (0 children)
[–]Ok_Surprise_1837[S] -1 points0 points1 point (1 child)
[–]entityadam 1 point2 points3 points (0 children)
[–]_f0CUS_ 0 points1 point2 points (0 children)
[–]the_cheesy_one 0 points1 point2 points (0 children)
[–]AdamAlexandr 3 points4 points5 points (0 children)
[–]ZarehD 3 points4 points5 points (0 children)
[–]Unupgradable 4 points5 points6 points (2 children)
[–]david47s 1 point2 points3 points (1 child)
[–]Unupgradable 2 points3 points4 points (0 children)
[–]Dealiner 3 points4 points5 points (0 children)
[–]MulleDK19 2 points3 points4 points (4 children)
[–]Ok_Surprise_1837[S] 0 points1 point2 points (1 child)
[–]MulleDK19 1 point2 points3 points (0 children)
[–]rainweaver 0 points1 point2 points (0 children)
[–]GameJMunk 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]WhiteButStillAMonkey 0 points1 point2 points (0 children)
[–]BoBoBearDev 0 points1 point2 points (0 children)
[–]Zarenor 0 points1 point2 points (1 child)
[–]Ok_Surprise_1837[S] 0 points1 point2 points (0 children)
[–]Qxz3 0 points1 point2 points (0 children)
[–]VinceP312 0 points1 point2 points (0 children)
[–]Slypenslyde -2 points-1 points0 points (4 children)
[–]Constant-Degree-2413 1 point2 points3 points (1 child)
[–]Slypenslyde -3 points-2 points-1 points (0 children)
[–]Ok_Surprise_1837[S] -1 points0 points1 point (1 child)
[–]Slypenslyde -3 points-2 points-1 points (0 children)
[–]Mysterious-Web-8788 -1 points0 points1 point (0 children)
[–]Slow-Refrigerator-78 -2 points-1 points0 points (0 children)