Can we force a c# compiler to run constructor first? -


as c# field initializers run before constructor. there way force compiler run constructor first?

thanks @jonathan, need know, why?

no.

if reason care order, initialize fields in constructor.

caring order of initialization seems code smell.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -