Question: This causes an `AccessViolationException` to be thrown:

```
using System;

namespace TestApplication
{
    internal static class Program
    {
        private static unsafe void Main()
        {
            ulong* addr = (ulong*)Int64.MaxValue;
            ulong val = *addr;
        }
    }
}

```

This causes a `NullReferenceException` to be thrown:

```
using System;

namespace TestApplication
{
    internal static class Program
    {
        private static unsafe void Main()
        {
            ulong* addr = (ulong*)0x000000000000FF;
            ulong val = *addr;
        }
    }
}

```

They're both invalid pointers and both violate memory access rules.
Why the NullReferenceException?

Answer: 
A null reference exception and an access violation exception are both raised by the CPU as an access violation. The CLR then has to guess whether the access violation should be specialized to a null reference exception or left as the more general access violation.

It is evident from your results that the CLR infers that access violations at addresses very close to 0 are caused by a null reference. Because they were almost certainly generated by a null reference plus field offset. Your use of unsafe code fools this heuristic.
This may be a semantics issue.

Your first example is trying to dereference a pointer whose content is the **address** Int64.MaxValue, not a pointer to a variable that has a **value** of Int64.MaxValue.

Looks like you're trying to read the value stored at the address Int64.MaxValue, which is, apparently not in the range that's owned by your process. 

Do you mean something like this?

```
        static unsafe void Main(string[] args)
        {
            ulong val = 1;// some variable space to store an integer
            ulong* addr = &val;
            ulong read = *addr;

            Console.WriteLine("Val at {0} = {1}", (ulong)addr, read);

#if DEBUG 
            Console.WriteLine("Press enter to continue");
            Console.ReadLine();
#endif
        }

```