I want to use CodeDOM to declare and initialize my static field in a single expression. How can i do this?
// for example public static int MyField = 5;
I can understand how to declare a static field, and I can set its value later, but I cannot get the above effect.
@lomaxx, Well, I just want a static one. I do not want const. This value may change. I just wanted simplicity to declare and start in one fell swoop. Itβs as if something in the encoded world is simple. Each type name is 20 characters long and you create these huge expression trees. Makes my eyes make mistakes. I'm only alive today thanks to reformatting reformatting.
source share