public struct MyStruct { private string str1; private int num1; //parametized constructors in a struct always obligated to initialize instance fields public MyStruct(string strParameter, int numParameter) { str1 = stringParameter; num1 = numParameter; } }
public class MyClass { private string str1; private int num1; //parametized constructors in a class not obligated to initialize instance fields public MyClass(string strParameter, int numParameter) { //nothing in the body } }
0
false
null
private string str1 = "default-Value"; private int num1 = 123;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)