Call one constructor from another

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Call one constructor from another

Message par Clippy »

Call one constructor from another
Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Re: Call one constructor from another

Message par Clippy »

Like this:

```
public Sample(string str) : this(int.Parse(str)) { }

```
Répondre

Revenir à « .NET & C# »