you can use Reflection but it will cost large memory overhead plus slower execution. You should avoid Reflection as much as possible. if there is no alternative try below like below by using reflection.
PropertyInfo propertyInfo = UserClass.GetType().GetProperty("UserID");
propertyInfo.SetValue(UserClass, Convert.ChangeType("123", propertyInfo.PropertyType),null);
or you can change your class like below
public class UserClass
{
public Dictionary<string,string> settings = new Dictionary<string,string>()
{
{"UserID" ,""},
{"Tipo" ,""},
{"WUserName" ,""},
{"NMec" ,""},
{"Area" ,""},
{"SubArea" ,""},
{"EquipaOrdem" ,""},
{"UserAdm" ,""},
{"SessionId" ,""}
};
}
then you can get/set values as below
UserClass user= new UserClass();
user.settings["UserID"] ="test1";
string id =user.settings["UserID"];