<legend id='2qs7c'><style id='2qs7c'><dir id='2qs7c'><q id='2qs7c'></q></dir></style></legend>

    <small id='2qs7c'></small><noframes id='2qs7c'>

  1. <i id='2qs7c'><tr id='2qs7c'><dt id='2qs7c'><q id='2qs7c'><span id='2qs7c'><b id='2qs7c'><form id='2qs7c'><ins id='2qs7c'></ins><ul id='2qs7c'></ul><sub id='2qs7c'></sub></form><legend id='2qs7c'></legend><bdo id='2qs7c'><pre id='2qs7c'><center id='2qs7c'></center></pre></bdo></b><th id='2qs7c'></th></span></q></dt></tr></i><div id='2qs7c'><tfoot id='2qs7c'></tfoot><dl id='2qs7c'><fieldset id='2qs7c'></fieldset></dl></div>
    1. <tfoot id='2qs7c'></tfoot>
        <bdo id='2qs7c'></bdo><ul id='2qs7c'></ul>
    2. 将 [Serializable] 添加到类是否会对性能产生影响?

      Does adding [Serializable] to the class have any performance implications?(将 [Serializable] 添加到类是否会对性能产生影响?)
      • <bdo id='QFNtS'></bdo><ul id='QFNtS'></ul>
        <i id='QFNtS'><tr id='QFNtS'><dt id='QFNtS'><q id='QFNtS'><span id='QFNtS'><b id='QFNtS'><form id='QFNtS'><ins id='QFNtS'></ins><ul id='QFNtS'></ul><sub id='QFNtS'></sub></form><legend id='QFNtS'></legend><bdo id='QFNtS'><pre id='QFNtS'><center id='QFNtS'></center></pre></bdo></b><th id='QFNtS'></th></span></q></dt></tr></i><div id='QFNtS'><tfoot id='QFNtS'></tfoot><dl id='QFNtS'><fieldset id='QFNtS'></fieldset></dl></div>

        <small id='QFNtS'></small><noframes id='QFNtS'>

              <legend id='QFNtS'><style id='QFNtS'><dir id='QFNtS'><q id='QFNtS'></q></dir></style></legend>
                <tbody id='QFNtS'></tbody>

              <tfoot id='QFNtS'></tfoot>

              • 本文介绍了将 [Serializable] 添加到类是否会对性能产生影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我需要将 [Serializable] 属性添加到对性能极为敏感的类.

                I need to add the [Serializable] attribute to a class that is extremely performance sensitive.

                这个属性会对类的操作产生任何性能影响吗?

                Will this attribute have any performance implications on the operation of the class?

                推荐答案

                属性类的实例仅在首次访问时创建.如果您不对特定类进行任何序列化,则永远不会调用 SerializableAttribute() 构造函数,因此不会导致任何性能问题.

                Instances of attribute classes are only created when they're first accessed. If you don't do any serialization on that particular class, the SerializableAttribute() constructor will never be called, hence it won't cause any performance issues.

                这是一篇关于属性构造函数的有趣文章:http://www.codingonthetrain.com/2008/10/attribute-constructors.html

                Here's an interesting article about attribute constructors: http://www.codingonthetrain.com/2008/10/attribute-constructors.html

                这篇关于将 [Serializable] 添加到类是否会对性能产生影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Performance overhead of using attributes in .NET(在 .NET 中使用属性的性能开销)
                Accessing attribute info from DTE(从 DTE 访问属性信息)
                c# Hide a property in datagridview with datasource(c#使用数据源隐藏datagridview中的属性)
                Extract Display name and description Attribute from within a HTML helper(从 HTML 帮助器中提取显示名称和描述属性)
                C# Attributes and their uses(C# 属性及其用途)
                C# - Getting all enums value by attribute(C# - 按属性获取所有枚举值)

                <small id='y7pFi'></small><noframes id='y7pFi'>

                <i id='y7pFi'><tr id='y7pFi'><dt id='y7pFi'><q id='y7pFi'><span id='y7pFi'><b id='y7pFi'><form id='y7pFi'><ins id='y7pFi'></ins><ul id='y7pFi'></ul><sub id='y7pFi'></sub></form><legend id='y7pFi'></legend><bdo id='y7pFi'><pre id='y7pFi'><center id='y7pFi'></center></pre></bdo></b><th id='y7pFi'></th></span></q></dt></tr></i><div id='y7pFi'><tfoot id='y7pFi'></tfoot><dl id='y7pFi'><fieldset id='y7pFi'></fieldset></dl></div>

              • <tfoot id='y7pFi'></tfoot>

                        • <bdo id='y7pFi'></bdo><ul id='y7pFi'></ul>
                            <tbody id='y7pFi'></tbody>
                          <legend id='y7pFi'><style id='y7pFi'><dir id='y7pFi'><q id='y7pFi'></q></dir></style></legend>