C# FAQ: How enforce constructor correctness in CSharp

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:FAQs
edit

How enforce constructor correctness in C# ?

Constructor correctness cannot be enforced in C#. Because, the Common Language Infrastructure (CLI) does not define constructor correctness. For instance, it cannot be specified that a method must not modify an argument being passed in to the method. Also, it cannot be specified that a method does not modify the object upon which it acts.


See also


Personal tools