Code snippet or shortcut to create a constructor in Visual Studio

前端 未结 17 1644
悲哀的现实
悲哀的现实 2020-12-23 12:57

What is the code snippet or shortcut for creating a constructor in Visual Studio?

Visual Studio 2010 and C#.

17条回答
  •  再見小時候
    2020-12-23 13:41

    1. Press Alt + Enter
    2. Select "Generate Constructor"
    3. Select required members

    A parameterized constructor is generated with the selected members.

提交回复
热议问题