---
title: "Discussion on \"Interchangeability of Integral Type Arrays\" | Hashnode"
description: "Discussion on \"Interchangeability of Integral Type Arrays\". In .NET, an array of a simple integral type can be cast to an array of another integral type, provided they have the same element size. This is possible because the CLR treats these arrays as having a compatible memory layout.\nint[] arrayOfInts = new..."
url: "https://hashnode.com/posts/interchangeability-of-integral-type-arrays/69552a8c35f526c0364c4e1c"
---

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

Discussion

# [Interchangeability of Integral Type Arrays](https://blog.antonr.net/interchangeability-of-integral-type-arrays?utm_source=hashnode&utm_medium=feed)

In .NET, an array of a simple integral type can be cast to an array of another integral type, provided they have the same element size. This is possible because the CLR treats these arrays as having a compatible memory layout. int\[\] arrayOfInts = new...

Oct 21, 2015 · 1 min read · blog.antonr.net  
Read the article

-   [#csharp](https://hashnode.com/tag/csharp)
-   [#array](https://hashnode.com/tag/array)
-   [#tricks](https://hashnode.com/tag/tricks)

## Written by

[Anton Ryzhov](https://hashnode.com/@antonryzhov)

@antonryzhov

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
