Hello,
lets assume we have the following class:
lets assume we have the following instances of that class:
How can I achieve, that different instances based on the same class, show different properties of that same class ?
lets assume we have the following class:
C#:
public class Person
{
public string FirstName { get; set; } = string.Empty; //1
public string LastName { get; set; } = string.Empty; //2
public int Age { get; set; } = 11; //3
public int Heigth { get; set; } = 100; //4
}
lets assume we have the following instances of that class:
C#:
Person _persion1 = new() //all properties available
Person _persion2 = new() //Only properies 1-3 avaibalbe, property 4 not visible
How can I achieve, that different instances based on the same class, show different properties of that same class ?
Last edited by a moderator: