2. Const are not binary compatible if the same const is used in different assemblies.
Showing posts with label Constants. Show all posts
Showing posts with label Constants. Show all posts
Saturday, January 5, 2008
Readonly Vs Const
1. Const are faster than readonly.
2. Const are not binary compatible if the same const is used in different assemblies. 3. Const can only be used with primitive data types, which can be initialized while declaration. 4. Const are available at compile time and readonly at runtime. 5. Const should be preferred only for values that does not change between releases. 6. Const can be preferred if they are accessible only within an assembly.
2. Const are not binary compatible if the same const is used in different assemblies.
Subscribe to:
Posts (Atom)