Visual C++ .NET/Structure/Constructor
struct with copy constructor
<source lang="csharp">
- include "stdafx.h"
using namespace System; ref struct R {
R() { val = 1; } R( R% r) { val = r.val; } property int val;
};
int main() {
R r;
}
</source>
<source lang="csharp">
using namespace System; ref struct R {
R() { val = 1; } R( R% r) { val = r.val; } property int val;
};
int main() {
R r;
}
</source>