I read in C++ vs C# section
C# does not provide defaults for constructors unlike C++
what does that mean?
This is a discussion on Defaults for Constructor within the C# Programming forums, part of the General Programming Boards category; I read in C++ vs C# section C# does not provide defaults for constructors unlike C++ what does that mean?...
I read in C++ vs C# section
C# does not provide defaults for constructors unlike C++
what does that mean?
You can add default values to contructors in C++
As yor book says, doesnt work in C# thoughCode:MyConstructor(int x = 0) { } MyConstructor m; //fine MyConstructor n(10); //fine