本文介绍了是.NET枚举Blittable型? (编组)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 显然有Blittable型的列表,所以到目前为止,我没有看到具体上枚举。他们是一般blittable?抑或是取决于它们是否有blittable基本类型中声明? Apparently there's a list of blittable types and so far I don't see Enums specifically on it. Are they blittable in general? Or does it depend on whether they are declared with a blittable base type? //e.g.internal enum SERVERCALL : uint{ IsHandled = 0, Rejected = 1, RetryLater = 2,}参考耗尽: Blittable和非Blittable型 默认封送的值类型 "Blittable and Non-Blittable Types""Default Marshaling for Value Types"推荐答案枚举是Blittable型。从 枚举关键字的文档:Enums are blittable types. From the enum keyword documentation:每个枚举类型都有一个 基础类型,可以是任何 整型除了字符。 Every enumeration type has an underlying type, which can be any integral type except char.由于底层类型是积分(所有这些都是Blittable型的名单上),则枚举也是blittable Because the underlying type is integral (all of which are on the list of blittable types), the enum is also blittable. 这篇关于是.NET枚举Blittable型? (编组)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-23 00:16