---
title: "Discussion on \"Pure Managed Code and AccessViolationException\" | Hashnode"
description: "Discussion on \"Pure Managed Code and AccessViolationException\". Be careful with explicit struct layout. Even when executing purely managed code, it is possible to trigger an AccessViolationException. Before I encountered this case, I was under the impression that the CLR (Common Language Runtime) prevented such m..."
url: "https://hashnode.com/posts/pure-managed-code-and-accessviolationexception/695528774828e5eea2e95efe"
---

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

Discussion

# [Pure Managed Code and AccessViolationException](https://blog.antonr.net/pure-managed-code-and-accessviolationexception?utm_source=hashnode&utm_medium=feed)

Be careful with explicit struct layout. Even when executing purely managed code, it is possible to trigger an AccessViolationException. Before I encountered this case, I was under the impression that the CLR (Common Language Runtime) prevented such m...

Nov 13, 2012 · 2 min read · blog.antonr.net  
Read the article

-   [#csharp](https://hashnode.com/tag/csharp)
-   [#struct](https://hashnode.com/tag/struct)
-   [#layout](https://hashnode.com/tag/layout)

## Written by

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

@antonryzhov

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
