i have a function like this, it get a typeof T, cipher the properties(all properties are string):
private T Cipher(T item)
{
var t = item.GetType();
//get all properties of item and put in a list
var props=new List<PropertyInfo>(t.GetProperties());
var vals= props.Select(propertyInfo =>
propertyInfo.GetValue(item).ToString()).ToList();
var cipher = new List<string>();
foreach (var val in vals)
{
cipher.Add(CipherString.Encrypt(val,"key");
}
is there any way to create a new typeof T property with new values of cipher
?
Edit: T is class definition with some properties