Kanhialal kk

Kanhialal kk

  • NA
  • 234
  • 338.2k

A new expression requires () or [] after type

May 17 2011 3:52 AM
Hi..
in following code this error is happening,(A new expression requires () or [] after type) I can't understand what is missing..

StringFormat format2 = new StringFormat {
                    Alignment = StringAlignment.Center,
                    LineAlignment = StringAlignment.Center,
                    FormatFlags = 0x800
                };

Kindly any body help..

Answers (4)