---
title: "Discussion on \"How array initializers decompile in C#\" | Hashnode"
description: "Discussion on \"How array initializers decompile in C#\". Write this:\nint[] primes = { 2, 3, 5, 7, 11, 13, 17, 19, 23 };\n\nand the natural guess is that the compiler emits nine stores — load the array, load an index, load a value, stelem.i4, nine times over."
url: "https://hashnode.com/posts/how-array-initializers-decompile-in-c/6af32746c79aa620ffe8ab6e"
---

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

Discussion

# [How array initializers decompile in C#](https://delta1labs.hashnode.dev/how-array-initializers-decompile-in-c?utm_source=hashnode&utm_medium=feed)

Write this: int\[\] primes = { 2, 3, 5, 7, 11, 13, 17, 19, 23 }; and the natural guess is that the compiler emits nine stores — load the array, load an index, load a value, stelem.i4, nine times over.

Nov 10 · 9 min read · delta1labs.hashnode.dev  
Updated 5h ago  
Read the article

-   [#glassnet](https://hashnode.com/tag/glassnet)
-   [#decompilation](https://hashnode.com/tag/decompilation)
-   [#dotnet](https://hashnode.com/tag/dotnet)
-   [#deepdive](https://hashnode.com/tag/deepdive)

## Written by

[Zero Heartbeat](https://hashnode.com/@clustron)

@clustron

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
