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

iis - ASP.Net Core CreatedAtAction in HttpPost action returns 201 but entire request ends with 500 -

gcc - Neither ld wrap nor LD_PRELOAD working to intercept system call -

ssh - Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer -