If I add the [Serializable]
attribute to a class, does this introduce any overhead? How about if the class is never used in any serialization operations?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
This doesn't add any overhead to the normal runtime use of the object.
Marking a class as
Serializable
doesn't even result in a size difference in metadata. It just sets a bit in the typedef flag. (Thanks to thecoop for pointing that out)