Last active
August 29, 2015 14:19
-
-
Save JayBazuzi/4f02815663201cb8bbf5 to your computer and use it in GitHub Desktop.
Using R# 9, uncomment one of the lines below and run Code Cleanup. I get different results depending on which I uncomment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class C | |
{ | |
public void F() | |
{ | |
} | |
public static readonly C C1 = new C {S = "sldkfjsldf"}; | |
// public static readonly C C2 = new C {S = C1.S}; | |
// public static readonly C C2 = new C {S = "sdflskdfj"}; | |
public string S; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class C | |
{ | |
public void F() | |
{ | |
} | |
public static readonly C C1 = new C {S = "sldkfjsldf"}; | |
public static readonly C C2 = new C {S = C1.S}; | |
public string S; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class C | |
{ | |
public static readonly C C1 = new C {S = "sldkfjsldf"}; | |
public static readonly C C2 = new C {S = "sldfksjdflkj"}; | |
public string S; | |
public void F() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the first case, the fields are all moved to the end of the class; in the second case, they move to the start of the class.