---
title: "Discussion on \"Passing an array of structs from C++ to C#\" | Hashnode"
description: "Discussion on \"Passing an array of structs from C++ to C#\". To pass an array of structs from C++ to C#, you can pass a pointer to a C-style array. In C++ you may have a struct, e.g.\n#pragma pack(push) #pragma pack(1) struct InputEvent { uint32_t eventId; float floatValue; uint32_t intValue; }; #pragma pack(po..."
url: "https://hashnode.com/posts/passing-an-array-of-structs-from-c-to-c-1/65c4dee2c9bdc4fa0cf0eb36"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Passing an array of structs from C++ to C#](https://roderickkennedy.com/passing-an-array-of-structs-from-c-to-c-1?utm_source=hashnode&utm_medium=feed)

To pass an array of structs from C++ to C#, you can pass a pointer to a C-style array. In C++ you may have a struct, e.g. #pragma pack(push) #pragma pack(1) struct InputEvent { uint32\_t eventId; float floatValue; uint32\_t intValue; }; #pragma pack(po...

Nov 12, 2020 · 2 min read · roderickkennedy.com  
Read the article

## Written by

[Roderick Kennedy](https://hashnode.com/@roderick)

@roderick

  
[View profile](https://hashnode.com/@roderick)

Simulation and Virtual Reality

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
