Files
flatbuffers/tests/MyGame/Example
bigjt 1a7495a6dd [C#] Add GetBytes methods for fixed arrays (#8633)
* [C#] Add GetBytes methods for fixed arrays

I wanted to direct access to fixed array bytes. I made some changes to the idl generator to create GetBytes functions following the same naming conventions used for vectors of scalar types. There was not a 'Length' field present to bound the existing index accessor so I added that too.

+ Add generic GetBytes for fixed length arrays of scalar types
+ Implement conditional compilation for ENABLE_SPAN_T:
  - ENABLE_SPAN_T: Returns `Span<T>` using `MemoryMarshal.Cast<byte, T>()` as needed.
  - Else: Returns `ArraySegment<byte>?` for raw byte access
+ Added tests reusing arrays_test.fbs definitions
+ Added const int Length field to support existing index based accessors

* [C#] Sync generated code for after adding GetBytes methods for fixed arrays

---------

Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com>
2026-02-04 23:13:32 +00:00
..
2015-05-12 15:40:29 -07:00
2023-09-30 18:54:48 -07:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2022-10-20 18:15:00 -07:00
2023-05-09 09:16:30 -07:00
2026-01-21 01:01:20 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2021-12-09 15:47:09 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2016-05-26 15:26:58 +02:00
2021-03-29 19:56:45 -04:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2016-05-26 15:26:58 +02:00
2025-09-23 21:50:27 -07:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-05-09 10:07:38 -07:00