Forests / Creating object properties in the initializer

Does anyone know how to “scaffold” or “generate” a constructor block for all properties of objects? I have VS2010 with Resharper and I want to create something like:

    public Customer CustomerB = new Customer
                                    {
                                        firstName = "",
                                        middleName = "",
                                        lastName = "",
                                        additionalPhone = "0",
                                        address1 = "",
                                        address2 = "",
                                        birthDate = new DateTime(),
                                        cellPhone = "",
                                        city = "",
                                        driverLicenseNumber = "",
                                        driverLicenseState = "",
                                        emailAddress = "",
                                        country = "",
                                        fax = "",
                                        grossIncome = 0,
                                        education = null,
                                        leadRequest = null
                                    };

Where can I then double back and fill in the blanks, so to speak. All I found are the properties of the DatabaseFirst and Getter / Setters properties ...

+5
source share
1 answer

I think it is not possible to generate an object initializer for all properties with VS and ReSharper. You need to press Ctrl + Space for each property selection.

+1
source

All Articles