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..
Loading
Suthish NairPosted May 17, 2011, 6:05 AM
Suthish NairPosted May 17, 2011, 6:56 AM
VulpesPosted May 17, 2011, 6:30 AM
This is because object initializers do allow you to omit the () if there's a parameterless constructor which there is for the StringFormat class.
If you are using one of these earlier versions, then you've no choice but to do it Suthish's way.
VulpesPosted May 17, 2011, 5:09 AM