How can i achieve something like this

DDreto9/9/2022
public class Test
{
  public string Name{get;set;}
}

//And i want to do
Test.Add(new string Surname)

//Result 
public class Test
{
  public string Name{get;set;}
  public string Surname{get;set;}
}
Mmtreit9/9/2022
Uh...what?
DDreto9/9/2022
Mhmhm how do i explain this ....
DDreto9/9/2022
I got a class
DDreto9/9/2022
and i want to add to it
DDreto9/9/2022
like modify it depending on an event lets say a foreach
Mmtreit9/9/2022
You want to programmatically add a property to an existing type definition?
Mmtreit9/9/2022
At runtime?
DDreto9/9/2022
yea
Mmtreit9/9/2022
That's not really a thing
DDreto9/9/2022
owh
DDreto9/9/2022
K well there goes my idea
DDreto9/9/2022
anyway thx
Mmtreit9/9/2022
You can implement something like a property bag
Mmtreit9/9/2022
Essentially a set of name / value pairs