Files
flatbuffers/tests
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
..
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-12-19 15:06:07 -08:00
2025-12-19 14:32:51 -08:00
2024-11-18 17:31:19 +00:00
2025-09-23 21:50:27 -07:00
2022-08-28 16:54:58 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2023-09-17 10:21:58 -07:00
2023-09-29 07:40:02 -07:00
2021-12-02 21:29:19 -08:00
2021-12-02 21:29:19 -08:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2026-01-21 01:01:20 +00:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-09-23 21:50:27 -07:00
2025-12-19 14:32:51 -08:00
2025-09-23 21:50:27 -07:00