What are the differences between .NET in 32 or 64 bit systems?

前端 未结 3 780
有刺的猬
有刺的猬 2021-02-10 16:43

Imagine a pure .NET application which do not uses COM components nor PInvoke. Does it matters if the target system is 32 or 64 bits?

3条回答
  •  温柔的废话
    2021-02-10 17:12

    Another way it can matter, apart from those identified by Reed Copsey, is if your "pure" application happens to use the System.IntPtr struct for something, or if it uses unsafe code (which isn't the same thing as P/Invoke) and pointer arithmetic.

    Another big one to look out for would be calls to pretty much anything in the System.Runtime.InteropServices.Marshal class. There are all kinds of awesome ways to shoot yourself in the foot in there (extremely useful when you need it, of course).

提交回复
热议问题