odd resharper indentation formatting for opject intializers

Posted by bitbonk on Stack Overflow See other posts from Stack Overflow or by bitbonk
Published on 2010-04-29T09:23:31Z Indexed on 2010/04/29 9:27 UTC
Read the original article Hit count: 381

Filed under:

For some strange reason when I have nested object intializers it always gets the last '}' wrong. It is not indented at all as shown in the following example:

namespace MyNameSpace
{   
    internal static class MyClass
    {
        static MyClass()
        {
            var bla = new Bla { Name = "Bla" };
            bla.Blub = new Blub
            {
                Name = "Blub", 
                Blap = new Blap { Name = "Blap", Visible = true }, 
                Blob = new Blob { Name = "Blob" }, 
                Blib = new Blib
                {
                    Blep = new Heater { Name = "Bleb" }, 
                    Id = 1, 
                    Blap = new Blap { Name = "Blap" } 
} // <---- wrong !!!
            };
        }
    }
}

Any idea what I can do against it ?

© Stack Overflow or respective owner

Related posts about resharper