Comments on: Constructors in C# https://code-maze.com/csharp-constructors/ Learn. Code. Succeed. Sat, 25 Mar 2023 10:15:25 +0000 hourly 1 https://wordpress.org/?v=6.7.5 By: Marinko Spasojević https://code-maze.com/csharp-constructors/#comment-7780 Sat, 25 Mar 2023 10:15:25 +0000 https://drafts.code-maze.com/?p=70599#comment-7780 In reply to Hasan Shahariar.

Hi Hasan.

You can have multiple constructors, one with a string parameter, one with the same class type, and one with both: var p = new Person(copyPerson, “test”); for example.

]]>
By: Hasan Shahariar https://code-maze.com/csharp-constructors/#comment-7777 Fri, 24 Mar 2023 18:19:10 +0000 https://drafts.code-maze.com/?p=70599#comment-7777 Copy constructor section: How can I create an instance with a string parametere where the constructor takes a parameter of type itself?

]]>