c# property public get private set code example Example: c# private set public int data { get; private set; } = 0;